Skip to content
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

Add example of using multiple controller managers under different namespaces. #170

Closed

Conversation

destogl
Copy link
Member

@destogl destogl commented Apr 7, 2022

No description provided.

@destogl destogl changed the title Add example of using multiple controller managers under differnet namespaces. Add example of using multiple controller managers under different namespaces. Apr 8, 2022
@destogl destogl marked this pull request as ready for review April 15, 2022 21:38
@destogl destogl marked this pull request as draft April 19, 2022 15:17
@destogl destogl marked this pull request as ready for review April 19, 2022 15:17
Copy link
Contributor

@jackcenter jackcenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be working on my system. After checking out this branch, the initial demo doesn't work as expected. If I run: ros2 launch ros2_control_demo_bringup rrbot.launch.py
then: `ros2 control list_hardware_interfaces '
I get:

command interfaces
	joint1/position [unclaimed]
	joint2/position [unclaimed]
state interfaces
	 joint1/position
	 joint2/position

and running: ros2 control list_hardware_interfaces
doesn't return anything anymore.
This demo works as expected if I checkout master

Also, running: ros2 launch ros2_control_demo_bringup rrbot_namespace.launch.py
brings up rrbot in rviz, but then running :ros2 control list_hardware_interfaces
returns: Could not contact service /controller_manager/list_hardware_interfaces
and running: ros2 control list_controllers
returns: Could not contact service /controller_manager/list_controllers

@destogl
Copy link
Member Author

destogl commented Apr 26, 2022

@jackcenter

Thanks for the review!

It seems that I have broke rrbot.launch.py example. I just fixed this, and it should work again now. I had some unintentional change still in the code.

Nevertheless, the “namespace” examples are updated, i.e., manual is updated, can you please check one more time? (I don't want to give you further details to “simulate” how a new user would approach the examples. — I am glad to give them to you after test if you are interested, but hopefully the README should be sufficient.)

And yes, this works currently only when ros2_control and ros2_controllers are compiled from source and with newest rolling on 22.04.

@destogl destogl added the New example This PR is proposing a new example. label Apr 26, 2022
jackcenter
jackcenter previously approved these changes Apr 28, 2022
Copy link
Contributor

@jackcenter jackcenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like everything works, and the simulations look cool! I wrote a few thoughts about the README organization.

README.md Outdated

- /rrbot/position_trajectory_controller
```
ros2 launch ros2_control_demo_bringup test_joint_trajectory_controller.launch.py publisher_config:=rrbot_namespace_joint_trajectory_publisher.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presentation thought: this doesn't output the commands as the forward_position_controller does, which may be confusing for new users. It's easy enough to echo the topic it tells you it's publishing on, but it might be a nice addition to output the commands for the demo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something we should update then in the ros2_controllers_test_nodes (here. Is this something you would be interested to do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I'll create an issue and take a look this week.

pos4: [0.0, 0.0]

joints:
- rrbot_1_joint1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random question: why does this file include the joints but ros2_control_demo_bringup/config/multi_controller_manager_forward_position_publisher.yaml doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because different type of publisher nodes are used and therefore different type of messages are published. Commands for JointTrajectoryController need to have joint names.

This file configures this publisher node.

The above one configured this node.

@destogl
Copy link
Member Author

destogl commented Apr 30, 2022

Looks like everything works, and the simulations look cool! I wrote a few thoughts about the README organization.

@jackcenter thanks for the thorough review!

Copy link
Contributor

mergify bot commented Dec 18, 2023

This pull request is in conflict. Could you fix it @destogl?

@christophfroehlich
Copy link
Contributor

Closing in favor of #423

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New example This PR is proposing a new example.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants