-
Notifications
You must be signed in to change notification settings - Fork 297
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
Use ros2 control with sdf model #632
Comments
Hi @karimrahimi76, We are currently working with URDF file format, which is standard for ROS visualization/simulation/manipulation. Is there a reason you cannot use URDF format? How are you then visualizing your robot in |
thank you for your response , i cannot use urdf because i want to simulate parallel robots and need "ball" joint and "universal" joint that urdf doesn't support that. |
Dear @karimrahimi76, In SDF with Gazebo it is needed because you need to simulate the closed kinematic chain. On the real robot, the mechanics is doing this for you. Strictly speaking you can write a URDF allowing to load the hardware interface for accessing the low level hardware of your robot. The URDF model will not include the closed kinematic structure. So if your goal is to control your real robot with ros2_control there is no immediate problem which forbid you to do so. The two main caveats are the following:
Note: this remark is only a view of my own understanding of ros2_control. |
@karimrahimi76 as I wrote… you only need to provide <ros2_control> part of URDF which is kinematics-agnostic… @olivier-stasse thanks for the clarification. I think your observations are fully right! |
dear @olivier-stasse thank you for your attention and response. |
dear @destogl |
The clue is that you ros2_control doesn't know anything about kinematics so you can also make it "broken" in URDF and things should work OK. |
I had a very similar problem, we solved it with the approach Olivier already outlined. Just for reference: rviz2 is fine with the full model if gazebo_ros2_control and joint_state_broadcaster publish all relevant joints describing the kinematic chains. While deploying this stuff to the real robot, one can
|
can you re-open this issue? Gazebo Harmonic allows to use SDF for robot description, instead of URDF. mentioned as last item here: https://github.com/gazebosim/gz-harmonic/blob/main/highlights.md, documentation is here https://gazebosim.org/docs/harmonic/ros2_interop/ but if I try to run this setup with ros2_control I see this:
robot_state_publisher and joint_state_publisher work with SDF. would be nice to make ros2_control work with it too |
I haven't tried this out, but the description says that the example is using https://github.com/ros/sdformat_urdf to create a URDF from the SDF, which is then passed to the ROS 2 world. This could work with ros2_control, if it is possible to generate the ros2_control tags into the URDF. We don't have plans to be able to provide SDF support inside ros2_control. |
I believe
I see ros2_control already uses
But, I don't believe the urdfdom data structures keep extra data, such as the ros2_control tags, so it will probably have to handle SDF files separately. I think changing only a small section of code might get us there. If we also allowed for ros2_control/hardware_interface/src/component_parser.cpp Lines 818 to 820 in 84e85f9
perhaps everything will "just work" 🤞🏾 . |
hi , i am trying to use ros2 control for a parallel robot , and my model is sdf format.
when i want to launch a project , controller manager needs robot description. but sdf format has no any robot tag.
even i tried to pass my project world and sdf format to controller manager, but it doesn't work too.
would anybody mind Is ros2 control works with sdf format?
how can I handle it?
The text was updated successfully, but these errors were encountered: