-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix namespacing for multiple instances of gazebo_ros2_control plugin (backport #181) #398
Conversation
…181) Co-authored-by: ben.holden <[email protected]> Co-authored-by: Christoph Froehlich <[email protected]> (cherry picked from commit 828b5f2)
you always can compile the branch of this PR from source. even if it is merged now, it will take a couple of weeks to be released as a binary |
@christophfroehlich do you mind running me through how i can compile this so that my workspace uses this customized version of the package? When I cloned and tried building it I ran into errors and I am fairly new to this so am not sure if I am making a mistake |
Checkout the mergify/bp/humble/pr-181 branch of this repository in your workspace and compile it with colcon. maybe you have to uninstall the installed binary (sudo apt-get remove ros-humbe-gazebo-ros2-control) |
Worked a charm, thank you for your support! |
@IslamTagi Could you please leave your approval here? (Files Changed Tab -> Review Changes Button) |
Hello @christophfroehlich, I too am looking for this to be backported to Humble. I am testing this using the humble-desktop docker image, and while it shows namespacing correctly for diff_drive_namespaced.launch.py, I am seeing this error when trying to run "diff_drive_pair_namespace.launch.py": [ERROR] [spawn_entity.py-6]: process has died [pid 3699, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -topic /r2/robot_description -robot_namespace r2 -entity diffbot1 --ros-args']. I'm guessing the topic for robot description should not include "/r2" if a namespace is specified? Or I could be missing something else. The error above is followed with the below warning, repeated. [ros2-9] [WARN] [1736193642.914013199] [_ros2cli_3981]: Could not contact service /r1/controller_manager/load_controller |
@ros-gy have you tried using the plugin from this PR? or the released one without this fix? |
I built this branch mergify/bp/humble/pr-181, and then tried that demo launch file. I'm looking to test this fix, and then give you the approval so we can get it into the binaries soon. |
Fixes the issue described in #127
It appears that when adding
__ns
tags to ros args on nodes that have already been namespaced, something odd happens.I'm not too sure what happens on the rclcpp node side of things but removing the additional namespace tags on the args seems to fix the issue for me at least.
I'm running Humble on 22.04 so I've only tested against the humble branch.
I also removed the additional RCL_ROS_ARGS_FLAG in the arguments because I don't think it was doing anything.
Cheers Ben
This is an automatic backport of pull request #181 done by Mergify.