Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Problem with reading the position of wam-v #739

Open
KonradUr opened this issue Sep 26, 2023 · 8 comments
Open

Problem with reading the position of wam-v #739

KonradUr opened this issue Sep 26, 2023 · 8 comments

Comments

@KonradUr
Copy link

Hi,

for testing with my own controllers, I need information about the wamv's position.

Using ROS1 + Gazebo11 it works in general properly:

rostopic echo /gazebo/model_states/pose[17]

It was more difficult with ROS2 and Gazebo Garden to get it moving, but after a few more installations in the docker, thrusters also started up.

Now, in ROS2 and Gazebo Garden I don't know how to read the current position. The elements of the group

/wamv/pose

return either fixed values or other than "pose" in the "component inspector" in GazeboSim. How to read the position of the device correctly? BTW: GPS and IMU readings are working properly.

@kulkarni-raunak
Copy link

You need to enable the ground truth flag in the file wamv_gazebo.urdf.xacro.

<xacro:arg name="ground_truth_enabled" default="true" />

@KonradUr
Copy link
Author

KonradUr commented Nov 9, 2023

Thanks for your help.
Will this modification add fields for /wamv/pose? Because I still can't find something like .../pose/position?

@kulkarni-raunak
Copy link

kulkarni-raunak commented Nov 10, 2023

After you enable the ground truth flag, look for topic /wamv/sensors/position/ground_truth_odometry

@KonradUr
Copy link
Author

I have no such topic like /wamv/sensors/position/... . Does anything else need to be done/compiled/whatever after changing the xacro content before relaunching the world?

@kulkarni-raunak
Copy link

No. For me it works by just enabling the ground_truth_enabled flag.

May be try building the package again and then launch the world.

@KonradUr
Copy link
Author

It started working after installing the latest versions: Gazebo Garden, ROS Humble and vrx. What's more, the current version on my machine shows 90% "simulation speed," while the older version (less than a year old) shows only 60%. So it was worth refreshing the model.
Thanks for your help.

@sontung1010
Copy link

Hi I added the ground truth flag as above instruction but nothing shows up on my rqt graph for ros2 humble. Can you please help me with this?

@kulkarni-raunak
Copy link

@sontung1010
Is the topic available for you via ros2 topic list?

Maybe post your rqt-graph here.

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

No branches or pull requests

3 participants