-
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
Add tricycle controller demo #145
Add tricycle controller demo #145
Conversation
faf9ab9
to
766d5f4
Compare
Hey @tonynajjar could you please fix the conflict on this one? |
…ycle-controller-demo
Done. What's the preferred way to activate the controllers, via the spawner as done in tricycle launch files or with "ros2 control" as done in differential launch files? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. What's the preferred way to activate the controllers, via the spawner as done in tricycle launch files or with "ros2 control" as done in differential launch files?
@tonynajjar, I prefer ros2 control
cmd, like the other examples
do you mind to fix linters?
Changed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing two things
- Include in the README.md how to launch the demo.
- Include a cpp example to move the robot
ros2 run gazebo_ros2_control_demos example_tricycle
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the tricycle controller
released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include tricyle controller
in the package.xml
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
No the PR is still not merged, I wanted to offer the maintainers a way to test it with this PR |
README.md
Outdated
@@ -235,6 +236,7 @@ ros2 run gazebo_ros2_control_demos example_position | |||
ros2 run gazebo_ros2_control_demos example_velocity | |||
ros2 run gazebo_ros2_control_demos example_effort | |||
ros2 run ign_ros2_control_demos example_diff_drive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ign_ros2_control_demos intentional here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, it's wrong too.
Do you have any plans to include this demo in ign_ros2_control
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No not at the moment, maybe when I migrate to ignition.
Changed ign_ros2_control_demos
to gazebo_ros2_control_demos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compiled from source the controller and I;m getting this error
[gzserver-1] [INFO] [1658874234.382522606] [controller_manager]: Loading controller 'tricycle_controller'
[gzserver-1] [INFO] [1658874234.405261155] [controller_manager]: Setting use_sim_time=True for tricycle_controller to match controller manager (see ros2_control#325 for details)
[gzserver-1] [INFO] [1658874234.428799512] [controller_manager]: Configuring controller 'tricycle_controller'
[gzserver-1] [INFO] [1658874234.458278809] [tricycle_controller]: On activate: Initialize Joints
[gzserver-1] [INFO] [1658874234.458323956] [tricycle_controller]: Get Wheel Joint Instance
[gzserver-1] [ERROR] [1658874234.458414226] [tricycle_controller]: Unable to obtain joint state handle for traction_joint
[gzserver-1] [INFO] [1658874234.458428779] [tricycle_controller]: Get Steering Joint Instance
[gzserver-1] [ERROR] [1658874234.458434899] [tricycle_controller]: Unable to obtain joint state handle for steering_joint
[gzserver-1] [WARN] [1658874234.458450560] []: Error occurred while doing error handling.
[gzserver-1] [ERROR] [1658874234.459401166] [controller_manager]: After activating, controller 'tricycle_controller' is in state 'unconfigured', expected Active
[ros2-6] Sucessfully loaded controller tricycle_controller into state active
Weird, I can't reproduce. What version of ros2_control are you using? it should be master. You might be missing these changes https://github.com/ros-controls/ros2_control/pull/737/files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the iterations! I will approve this PR, but I can't merge it until the other PR ros-controls/ros2_controllers#345 is in.
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Thanks for the review, I made the last fixes. Yep, let's wait for the other PR to be merged first 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great example! I have tested it and it works!
Thank you for this example @tonynajjar, do you have any plans to add this example to |
No problem! As mentioned here I wasn't thinking of adding it to gz_ros2_control but if it's not too much work I can give it a shot (I don't know how different Gazebo and Gazebo Classic are) |
great @tonynajjar, feel free to ping me if you need help |
After ros-controls/ros2_controllers#345 is merged