-
Notifications
You must be signed in to change notification settings - Fork 91
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 Demos for SDF #427
Add Demos for SDF #427
Conversation
Signed-off-by: Aarav Gupta <[email protected]>
@ahcorde Can I get an initial review? |
@@ -0,0 +1,107 @@ | |||
# Copyright 2022 Open Source Robotics Foundation, Inc. |
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.
# Copyright 2022 Open Source Robotics Foundation, Inc. | |
# Copyright 2024 Open Source Robotics Foundation, Inc. |
robot_description_content = Command( | ||
[ | ||
PathJoinSubstitution([FindExecutable(name='xacro')]), | ||
' ', | ||
PathJoinSubstitution( | ||
[FindPackageShare('gz_ros2_control_demos'), | ||
'sdf', 'test_diff_drive.xacro.sdf'] | ||
), | ||
] | ||
) |
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.
you don't need to do that, the sdf file doesn't have any xacro tag. You should read the file as it's
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.
you should be able to use something like from launch.substitutions import FileContent
Signed-off-by: Aarav Gupta <[email protected]>
@ahcorde I decided it would be better for the description format to be an argument of the launch file. I did need to use an OpaqueFunction for this (please tell me if there is a simple way), have a look at ed7f047. |
If the purpose of the demo is to have a urdf and sdf description separately demonstrated but in the same use case, I think the separate argument makes sense. |
Signed-off-by: Aarav Gupta <[email protected]>
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.
Do you mind to add some docs to the README.md ?
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.
There are conflicts, do you mind to fix it ?
Signed-off-by: Aarav Gupta <[email protected]>
Signed-off-by: Aarav Gupta <[email protected]>
If everything looks good now, I will also add SDF versions for the other 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.
While I was compiling the documentation of this PR I noticed that the setup is wrong. This PR should configure the docs file properly.
also If you run the documentation command there are some errors
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
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.
There are some issues:
gz_ros2_control_demos/launch/ackermann_drive_example.launch.py:39:21: E128 continuation line under-indented for visual indent
gz_ros2_control_demos/launch/ackermann_drive_example.launch.py:40:21: E128 continuation line under-indented for visual indent
gz_ros2_control_demos/launch/ackermann_drive_example.launch.py:91:9: E222 multiple spaces after operator
gz_ros2_control_demos/launch/diff_drive_example.launch.py:39:21: E128 continuation line under-indented for visual indent
gz_ros2_control_demos/launch/diff_drive_example.launch.py:40:21: E128 continuation line under-indented for visual indent
Signed-off-by: Aarav Gupta <[email protected]>
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 robot moving ? I can't move the diff_drive or ackermann examples
Yes, the robot does move for me upon running |
The issue that I mentioned is unrelated to this PR, we can merge this. |
Adds demos for SDF. Linked to #ros2_control/1763.
These demos should help in testing the PR.
A couple of things I want an opinion on:
sdf
directory is that okay or should something else be done?To test the diff_drive demo for SDF:
ros2 launch gz_ros2_control_demos diff_drive_example_sdf.launch.py
ros2 run gz_ros2_control_demos example_diff_drive
The simulation should show a behaviour similar to the diff_drive demo for URDF.