0
$\begingroup$

I'm currently working on simulating an unmanned surface vehicle (USV) using Gazebo Garden. Specifically, I'm using the LRAUV Simulation model. My goal is to obtain the 6 degrees of freedom (6-DOF) data of the USV within a ROS2 node.

I would greatly appreciate any guidance on how to achieve this integration. If anyone has experience or insights into connecting Gazebo Garden with ROS2 for the LRAUV Simulation model, I'd be grateful for your assistance.

Thank you in advance for your help!

$\endgroup$
4
  • 1
    $\begingroup$ Are you looking for Ground Truth from the simulation, or for something that can also give the answer on a real robot? $\endgroup$
    – Mike973
    Commented Dec 21, 2023 at 12:24
  • $\begingroup$ Thanks for asking , I would like to implement it in the simulation. $\endgroup$ Commented Dec 23, 2023 at 4:45
  • $\begingroup$ Please edit your post to explain from where you need this information: from inside another gazebo plugin, from inside a ros2 node, from the terminal command line? The method is different depending on the environment you access gazebo-garden from. $\endgroup$
    – Mike973
    Commented Dec 24, 2023 at 15:31
  • $\begingroup$ Thank you for your suggestion, I have updated my post. $\endgroup$ Commented Dec 25, 2023 at 0:24

1 Answer 1

0
$\begingroup$

The simplest approach for gazebo-ignition is:

  1. in gazebo, install the get_entity_state plugin that creates a ros2 service which will provide the state of a gazebo-model. The plugin filename is libgazebo_ros_state.so (I think from the gazebo_ros package.)

  2. in your ros2 node, make a ros2 service call to /gazebo/get_entity_state with the args set to the proper values. You will get back a message with the object's current pose & twist.

This plugin is discussed in Ques1 and Ques2.

$\endgroup$
1
  • $\begingroup$ Thank you so much for your comment~I found that install the get_entity_state plugin didn't work for me. So I change the Gazebo version to Homonic. $\endgroup$ Commented Mar 26 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.