-
Notifications
You must be signed in to change notification settings - Fork 310
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
Loading robot_description
from topic does not work as expected
#1262
Comments
Just wondering whether you re-mapped the robot description? The controller manager loads the description from You can check this example https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/1e200b5b6d675d1d023be6a1114aa6c27e17a2f9/lbr_ros2_control/lbr_ros2_control/launch_mixin.py#L74 I do also think that this is rather inconvenient but maybe there is a motivation for this choice? It works fine however. |
Attempted to implement loading
And when listing the controllers I see the joint_state_broadcaster controller is
@destogl could you help us figure out a solution and provide some feedback on Paul's fix |
maybe it is a matter of launching order then? Maybe launch the robot state publisher prior and add an event handler? Sorry just guessing. Not saying this should be necessary :D |
I've added a small change in the CM services setup in this PR: #1271. This should ideally solve your issue. The changes are simple, it won't expose any controller manager service until the resource manager is set up. I think this way the spawners can wait for the service availability and then trigger the controller switching. I would appreciate it if you could test it and let us know. Thank you, |
@saikishor we're using humble in our moveit studio setup where I saw the errors I mentioned above so I cherry-picked your #1271 commits onto the humble branch of ros2_control and tested on our setup. Looks like the robot_description gets loaded from the topic without issue and I no longer see those joint_state_broadcaster errors pop up in the logs with your changes added so that's all looking good to me |
I opened a PR for humble changes: #1272 |
@dyackzan I'm glad it worked for you :) |
Describe the bug
There are two ways to load the robot description in the controller manager 1) via a parameter 2) via a topic. If I try to load the description via a topic, I get an error:
The reason this happens is because
ControllerManager::init_resource_manager
does not get called before the first call toControllerManager::read
. This is because it takes some time to receive robot description from the topic.To Reproduce
It should be reproducible in most configurations as long as the robot description is published to a topic instead of passed in as a parameter.
Expected behavior
I expect the controller manager to either wait for the resource manager to be initialized before entering the main loop or maybe wait to load controllers until the resource manager is initialized.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: