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 Demos for SDF #427

Draft
wants to merge 3 commits into
base: rolling
Choose a base branch
from
Draft

Add Demos for SDF #427

wants to merge 3 commits into from

Conversation

Amronos
Copy link

@Amronos Amronos commented Oct 17, 2024

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:

  1. Should using URDF or SDF be an argument of the launch file?
  2. What should be the name of the launch file?
  3. I have put the SDF files in a new 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.

Signed-off-by: Aarav Gupta <[email protected]>
@Amronos
Copy link
Author

Amronos commented Nov 8, 2024

@ahcorde Can I get an initial review?

@@ -0,0 +1,107 @@
# Copyright 2022 Open Source Robotics Foundation, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# Copyright 2022 Open Source Robotics Foundation, Inc.
# Copyright 2024 Open Source Robotics Foundation, Inc.

Comment on lines +31 to +40
robot_description_content = Command(
[
PathJoinSubstitution([FindExecutable(name='xacro')]),
' ',
PathJoinSubstitution(
[FindPackageShare('gz_ros2_control_demos'),
'sdf', 'test_diff_drive.xacro.sdf']
),
]
)
Copy link
Collaborator

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

Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants