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

sdformat_urdf parser demo #265

Merged
merged 19 commits into from
Sep 1, 2022
Merged

sdformat_urdf parser demo #265

merged 19 commits into from
Sep 1, 2022

Conversation

quarkytale
Copy link
Contributor

@quarkytale quarkytale commented Jun 24, 2022

🎉 New demo

Summary

Demonstrating SDFormat XML as a robot description format instead of URDF XML using sdformat_urdf plugin. The parser takes the SDF file published on /robot_description topic by robot_state_publisher and converts it to URDF C++ DOM structures. Joint states and TFs are bridged using ros_ign_bridge enabling RViz to visualize the RobotModel and odometry simulated by a Gazebo world.
Also demonstrates a use-case of #259.

Changes made

  • Parser compatible SDF model
  • Gazebo world with required plugins (JointStatePublisher, PosePublisher, OdometryPublisher)
  • Launch file bringing up launch arguments, Gazebo, ros_ign_bridge, robot_state_publisher and RViz
  • RViz config
  • Installation framework for the new model and world

Snapshots

vehicle

vehicle_on_rviz.mp4

Test it

In a colcon workspace, install ros_gz and sdformat_urdf from source. Make sure you have the latest Gazebo fortress release.
Run the demo launch file with the rviz launch argument set.

ros2 launch ros_ign_gazebo_demos sdf_parser.launch.py rviz:=True

Start the simulation in Gazebo and wait a second for TFs to be published.
Send commands for the vehicle to move in circles, matching its trajectory in Gazebo and RViz.

ign topic -t "/model/vehicle/cmd_vel" -m ignition.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}"
ros2 topic pub /model/vehicle/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: -0.1}}

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
@osrf-triage osrf-triage added this to Inbox in Core development Jun 24, 2022
@quarkytale quarkytale moved this from Inbox to In progress in Core development Jun 24, 2022
@chapulina chapulina added ROS 2 ROS 2 MBARI buoy Sponsored by MBARI buoy sim project: https://github.com/osrf/buoy_sim labels Jun 24, 2022
…all paths

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
@quarkytale quarkytale marked this pull request as ready for review June 30, 2022 00:29
@chapulina chapulina moved this from In progress to In review in Core development Jul 6, 2022
@mjcarroll
Copy link
Collaborator

I'm pretty sure CI is consistently broken on the ros2 branch.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

This PR should help with sdformat_urdf + Garden. We need to build that from source with Garden enabled on this project's CI.

ros_ign_gazebo_demos/models/vehicle/model.config Outdated Show resolved Hide resolved
ros_ign_gazebo_demos/models/vehicle/model.config Outdated Show resolved Hide resolved
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
@chapulina chapulina added the enhancement New feature or request label Jul 23, 2022
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

The demo isn't working for me on RViz, have you tried the latest state of this branch, @quarkytale ? I haven't dug to see what could be wrong.

ros_ign_gazebo_demos/CMakeLists.txt Outdated Show resolved Hide resolved
ros_ign_gazebo_demos/package.xml Outdated Show resolved Hide resolved
ros_ign_gazebo_demos/worlds/vehicle.sdf Outdated Show resolved Hide resolved
ros_ign_gazebo_demos/worlds/vehicle.sdf Outdated Show resolved Hide resolved
ros_ign_gazebo_demos/worlds/vehicle.sdf Outdated Show resolved Hide resolved
ros_ign_gazebo_demos/worlds/vehicle.sdf Outdated Show resolved Hide resolved
ros_ign_gazebo_demos/worlds/vehicle.sdf Outdated Show resolved Hide resolved
methylDragon and others added 4 commits July 27, 2022 00:16
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Clean up shared libraries, and tick-tock RosGzPointCloud
Tick-tock launch args
Hard-tock ign_ in sources
Migrate ign, ign_, IGN_ for sources, launch, and test files
Migrate IGN_XXX_VER, IGN_T, header guards
Migrate launchfile, launchfile args, and test source references
Migrate ros_ign_XXX and gz_gazebo -> gz_sim
Migrate ros_ign_XXX project names
Migrate Ign, ign-, IGN_DEPS, ign-gazebo
Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign
Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>, ros_ign_ci

Signed-off-by: methylDragon <methylDragon@gmail.com>
@quarkytale quarkytale changed the base branch from ros2 to ros_gz_migration-mv July 30, 2022 05:06
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
@quarkytale
Copy link
Contributor Author

test_launch_test_ros_subscriber.launch.py is failing for fortress+humble

@methylDragon methylDragon force-pushed the ros_gz_migration-mv branch 2 times, most recently from fa9cf16 to 07bca97 Compare August 17, 2022 00:14
Base automatically changed from ros_gz_migration-mv to ros2 August 17, 2022 01:55
@nkoenig nkoenig requested a review from ahcorde August 22, 2022 18:47
@mjcarroll mjcarroll self-requested a review August 22, 2022 21:05
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Some minor comments with things I needed to do for this to run

ros_gz_sim_demos/launch/sdf_parser.launch.py Outdated Show resolved Hide resolved
ros_gz_sim_demos/worlds/vehicle.sdf Outdated Show resolved Hide resolved
ros_gz_sim_demos/launch/sdf_parser.launch.py Show resolved Hide resolved
ros_gz_sim_demos/launch/sdf_parser.launch.py Show resolved Hide resolved
ros_ign_gazebo_demos/package.xml Outdated Show resolved Hide resolved
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
@quarkytale quarkytale enabled auto-merge (squash) September 1, 2022 20:01
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

This is great! 🚀

@quarkytale quarkytale merged commit 6b05462 into ros2 Sep 1, 2022
Core development automation moved this from In review to Done Sep 1, 2022
@quarkytale quarkytale deleted the quarkytale/parser_demo branch September 1, 2022 23:33
@chapulina chapulina moved this from Done to Highlights in Core development Sep 2, 2022
mjcarroll added a commit that referenced this pull request Sep 22, 2022
* parser compatible model and launch framework

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* added ground plane, common gz plugins, demo commands and cleaned install paths

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* unique collision names and cleared flake

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* updating model config

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* building parser from source

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* fix flake and update deb dependency for garden

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* Move packages and files to gz

Signed-off-by: methylDragon <methylDragon@gmail.com>

* feedback and ign->gz

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* Support ros_ign migration

Clean up shared libraries, and tick-tock RosGzPointCloud
Tick-tock launch args
Hard-tock ign_ in sources
Migrate ign, ign_, IGN_ for sources, launch, and test files
Migrate IGN_XXX_VER, IGN_T, header guards
Migrate launchfile, launchfile args, and test source references
Migrate ros_ign_XXX and gz_gazebo -> gz_sim
Migrate ros_ign_XXX project names
Migrate Ign, ign-, IGN_DEPS, ign-gazebo
Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign
Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>, ros_ign_ci

Signed-off-by: methylDragon <methylDragon@gmail.com>

* renaming and flake

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* added ros commands

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* gz-version

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* feedback and ci trial

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* removing garden condition

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: methylDragon <methylDragon@gmail.com>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MBARI buoy Sponsored by MBARI buoy sim project: https://github.com/osrf/buoy_sim ROS 2 ROS 2
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants