Package Summary

Tags No category tags.
Version 0.244.3
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ignitionrobotics/ros_ign.git
VCS Type git
VCS Version humble_garden
Last Updated 2022-09-13
Dev Status DEVELOPED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Demos using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Louise Poubel

Authors

No additional authors.

ROS + Gazebo Sim demos

This package contains demos showing how to use Gazebo Sim with ROS.

Run Gazebo Sim

There's a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Air pressure

Publishes fluid pressure readings.

ros2 launch ros_gz_sim_demos air_pressure.launch.py

This demo also shows the use of custom QoS parameters. The sensor data is published as as "best-effort", so trying to subscribe to "reliable" data won't work. See the difference between:

ros2 topic echo /air_pressure --qos-reliability best_effort

And

ros2 topic echo /air_pressure --qos-reliability reliable

Camera

Publishes RGB camera image and info.

Images can be exposed to ROS through ros_gz_bridge or ros_gz_image.

Using the image bridge (unidirectional, uses image_transport):

ros2 launch ros_gz_sim_demos image_bridge.launch.py

Using the regular bridge:

ros2 launch ros_gz_sim_demos camera.launch.py

To use a camera that only publishes information when triggered:

ros2 launch ros_gz_sim_demos triggered_camera.launch.py

Trigger the camera:

ros2 topic pub /camera/trigger std_msgs/msg/Bool "{data: true}" --once

Diff drive

Send commands to a differential drive vehicle and listen to its odometry.

ros2 launch ros_gz_sim_demos diff_drive.launch.py

Then unpause and send a command

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.5}}"

This demo also shows the use of custom QoS parameters. The commands are subscribed to as "reliable", so trying to publish "best-effort" commands won't work. See the difference between:

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.0}}" --qos-reliability reliable

And

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.0}}" --qos-reliability best_effort

Depth camera

Depth camera data can be obtained as:

  • sensor_msgs/msg/Image, through ros_gz_bridge or ros_gz_image
  • sensor_msgs/msg/PointCloud2, through ros_gz_point_cloud

Using the image bridge (unidirectional, uses image_transport):

ros2 launch ros_gz_sim_demos image_bridge.launch.py image_topic:=/depth_camera

TODO: Blocked by ros_gz_point_cloud issue.

Using Gazebo Sim plugin:

ros2 launch ros_gz_sim_demos depth_camera.launch.py

GPU lidar

GPU lidar data can be obtained as:

  • sensor_msgs/msg/LaserScan, through the ros_gz_bridge
  • sensor_msgs/msg/PointCloud2, through the ros_gz_bridge or ros_gz_point_cloud

Using the bridge:

ros2 launch ros_gz_sim_demos gpu_lidar_bridge.launch.py

TODO: Blocked by ros_gz_point_cloud issue.

Using Gazebo Sim plugin:

ros2 launch ros_gz_sim_demos gpu_lidar.launch.py

IMU

Publishes IMU readings.

ros2 launch ros_gz_sim_demos imu.launch.py

TODO: IMU display missing for RViz2

Magnetometer

Publishes magnetic field readings.

ros2 launch ros_gz_sim_demos magnetometer.launch.py

RGBD camera

RGBD camera data can be obtained as:

  • sensor_msgs/msg/Image, through ros_gz_bridge or ros_gz_image
  • sensor_msgs/msg/PointCloud2, through ros_gz_bridge or ros_gz_point_cloud

Using the image bridge (unidirectional, uses image_transport):

# RGB image
ros2 launch ros_gz_sim_demos image_bridge.launch.py image_topic:=/rgbd_camera/image
# Depth image
ros2 launch ros_gz_sim_demos image_bridge.launch.py image_topic:=/rgbd_camera/depth_image

Using the regular bridge:

ros2 launch ros_gz_sim_demos rgbd_camera_bridge.launch.py

TODO: Blocked by ros_gz_point_cloud issue.

Using Gazebo Sim plugin:

ros2 launch ros_gz_sim_demos rgbd_camera.launch.py

Battery

Get the current state of a battery.

ros2 launch ros_gz_sim_demos battery.launch.py

Then send a command so the vehicle moves and drains the battery

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.5}}"

Robot description publisher

Leverage the robot description publisher to spawn a new urdf model in gazebo and show it in rviz2. To try the demo launch:

ros2 launch ros_gz_sim_demos robot_description_publisher.launch.py

Joint States Publisher

Publishes joint states of the robot.

To try the demo launch:

ros2 launch ros_gz_sim_demos joint_states.launch.py

Bridging joint state and pose publishers

The launch file demonstrates bridging Gazebo poses to TFMessage to visualize the pose and transforms of a robot in rviz.

To try the demo launch:

ros2 launch ros_gz_sim_demos tf_bridge.launch.py

CHANGELOG

Changelog for package ros1_gz_sim_demos

0.244.3 (2022-05-19)

  • [ros2] README updates (service bridge, Gazebo rename) (#252)
  • Fix linter tests (#251) Co-authored-by: Louise Poubel <louise@openrobotics.org>
  • Joint state publisher and tf bridging demo (#244) * Added joint state publisher and tf bridge demo Co-authored-by: Louise Poubel <louise@openrobotics.org>

  • Contributors: Aditya Pande, Daisuke Nishimatsu, Louise Poubel

0.244.2 (2022-04-25)

  • Camera trigger demo (#223)
  • Separate galactic branch from ros2 branch (#201)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim_demos at answers.ros.org

No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.6
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ignitionrobotics/ros_ign.git
VCS Type git
VCS Version ros2
Last Updated 2022-10-03
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Demos using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Louise Poubel

Authors

No additional authors.

ROS + Gazebo Sim demos

This package contains demos showing how to use Gazebo Sim with ROS.

Run Gazebo Sim

There's a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Air pressure

Publishes fluid pressure readings.

ros2 launch ros_gz_sim_demos air_pressure.launch.py

This demo also shows the use of custom QoS parameters. The sensor data is published as as "best-effort", so trying to subscribe to "reliable" data won't work. See the difference between:

ros2 topic echo /air_pressure --qos-reliability best_effort

And

ros2 topic echo /air_pressure --qos-reliability reliable

Camera

Publishes RGB camera image and info.

Images can be exposed to ROS through ros_gz_bridge or ros_gz_image.

Using the image bridge (unidirectional, uses image_transport):

ros2 launch ros_gz_sim_demos image_bridge.launch.py

Using the regular bridge:

ros2 launch ros_gz_sim_demos camera.launch.py

To use a camera that only publishes information when triggered:

ros2 launch ros_gz_sim_demos triggered_camera.launch.py

Trigger the camera:

ros2 topic pub /camera/trigger std_msgs/msg/Bool "{data: true}" --once

Diff drive

Send commands to a differential drive vehicle and listen to its odometry.

ros2 launch ros_gz_sim_demos diff_drive.launch.py

Then unpause and send a command

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.5}}"

This demo also shows the use of custom QoS parameters. The commands are subscribed to as "reliable", so trying to publish "best-effort" commands won't work. See the difference between:

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.0}}" --qos-reliability reliable

And

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.0}}" --qos-reliability best_effort

Depth camera

Depth camera data can be obtained as:

  • sensor_msgs/msg/Image, through ros_gz_bridge or ros_gz_image
  • sensor_msgs/msg/PointCloud2, through ros_gz_point_cloud

Using the image bridge (unidirectional, uses image_transport):

ros2 launch ros_gz_sim_demos image_bridge.launch.py image_topic:=/depth_camera

TODO: Blocked by ros_gz_point_cloud issue.

Using Gazebo Sim plugin:

ros2 launch ros_gz_sim_demos depth_camera.launch.py

GPU lidar

GPU lidar data can be obtained as:

  • sensor_msgs/msg/LaserScan, through the ros_gz_bridge
  • sensor_msgs/msg/PointCloud2, through the ros_gz_bridge or ros_gz_point_cloud

Using the bridge:

ros2 launch ros_gz_sim_demos gpu_lidar_bridge.launch.py

TODO: Blocked by ros_gz_point_cloud issue.

Using Gazebo Sim plugin:

ros2 launch ros_gz_sim_demos gpu_lidar.launch.py

IMU

Publishes IMU readings.

ros2 launch ros_gz_sim_demos imu.launch.py

TODO: IMU display missing for RViz2

Magnetometer

Publishes magnetic field readings.

ros2 launch ros_gz_sim_demos magnetometer.launch.py

GNSS

Publishes satellite navigation readings, only available in Fortress on.

ros2 launch ros_gz_sim_demos navsat.launch.py

RGBD camera

RGBD camera data can be obtained as:

  • sensor_msgs/msg/Image, through ros_gz_bridge or ros_gz_image
  • sensor_msgs/msg/PointCloud2, through ros_gz_bridge or ros_gz_point_cloud

Using the image bridge (unidirectional, uses image_transport):

# RGB image
ros2 launch ros_gz_sim_demos image_bridge.launch.py image_topic:=/rgbd_camera/image
# Depth image
ros2 launch ros_gz_sim_demos image_bridge.launch.py image_topic:=/rgbd_camera/depth_image

Using the regular bridge:

ros2 launch ros_gz_sim_demos rgbd_camera_bridge.launch.py

TODO: Blocked by ros_gz_point_cloud issue.

Using Gazebo Sim plugin:

ros2 launch ros_gz_sim_demos rgbd_camera.launch.py

Battery

Get the current state of a battery.

ros2 launch ros_gz_sim_demos battery.launch.py

Then send a command so the vehicle moves and drains the battery

ros2 topic pub /model/vehicle_blue/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 5.0}, angular: {z: 0.5}}"

Robot description publisher

Leverage the robot description publisher to spawn a new urdf model in gazebo and show it in rviz2. To try the demo launch:

ros2 launch ros_gz_sim_demos robot_description_publisher.launch.py

Joint States Publisher

Publishes joint states of the robot.

To try the demo launch:

ros2 launch ros_gz_sim_demos joint_states.launch.py

Bridging joint state and pose publishers

The launch file demonstrates bridging Gazebo poses to TFMessage to visualize the pose and transforms of a robot in rviz.

To try the demo launch:

ros2 launch ros_gz_sim_demos tf_bridge.launch.py

CHANGELOG

Changelog for package ros1_gz_sim_demos

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • sdformat_urdf parser demo (#265)

    • parser compatible model and launch framework
    • added ground plane, common gz plugins, demo commands and cleaned install paths
    • unique collision names and cleared flake
    • updating model config
    • building parser from source
    • fix flake and update deb dependency for garden
    • Move packages and files to gz
    • feedback and ign->gz

    * 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 - renaming and flake - added ros commands - gz-version - feedback and ci trial

    * removing garden condition Co-authored-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: methylDragon <methylDragon@gmail.com> Co-authored-by: Louise Poubel <louise@openrobotics.org>

  • Support ros_ign migration (#282) 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

  • Move packages and files to gz (#282)

  • Contributors: Dharini Dutia, methylDragon

0.244.3 (2022-05-19)

  • [ros2] README updates (service bridge, Gazebo rename) (#252)
  • Fix linter tests (#251) Co-authored-by: Louise Poubel <louise@openrobotics.org>
  • Joint state publisher and tf bridging demo (#244) * Added joint state publisher and tf bridge demo Co-authored-by: Louise Poubel <louise@openrobotics.org>

  • Contributors: Aditya Pande, Daisuke Nishimatsu, Louise Poubel

0.244.2 (2022-04-25)

  • Camera trigger demo (#223)
  • Separate galactic branch from ros2 branch (#201)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim_demos at answers.ros.org

No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.