ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

No mattter what the initial position I set, the position x and y subscribing from topic "/g500/pose" and "/uwsim/girona_500/odom is still 0, and z is increasing.

asked 2016-02-25 08:35:43 -0500

ZYS gravatar image

No mattter what the initial position I set, the position x and y subscribing from topic "/g500/pose" and "/uwsim/girona_500/odom is still 0, and z is increasing. But actually, I can see that the vehicle is exactly at the position which I set.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-02-25 09:29:52 -0500

Javier Perez gravatar image


I guess you are using the uwsim underwater_vehicle_dynamics package as the vehicle is "falling" (z increasing). When using the vehicle_dynamics package the initial position must be stated in it (no matter what you set in the uwsim XML config file) as that package is the one who sets the vehicle position in uwsim. Just set the position in the yaml file (g500/dynamics/initial_pose: ). We are still working to integrate the dynamics inside UWSim so everything is easier...

You also have to send messages to the thrusters_input, if you send velocities or positions to UWSim expect weird results as two nodes will be sending different information to UWSim.

edit flag offensive delete link more


Thank you. Then I set the position in the yaml file:g500/dynamics/initial_pose: [1, 1, 1] But the result is still the same.

ZYS gravatar image ZYS  ( 2016-02-25 09:49:20 -0500 )edit

Oh I understand, I should set the position like this g500/dynamics/initial_pose: [1.0, 1.0, 1.0, 0, 0, 1.57]

ZYS gravatar image ZYS  ( 2016-02-25 09:53:27 -0500 )edit

Hi Javier, I run into another problem for the multibeam sensor. When I set to have 10 increase between -20 & 20 degree for it, it has 5 readings with the 1st one "NaN" and the last one "0.0". Also, in the GUI, I only see 4 green beams rather than expected 5 beams. How should I use the readings?

ZYS gravatar image ZYS  ( 2016-07-12 13:18:30 -0500 )edit

Hi, try to post a new question next time. I've seen there is a bug rounding numbers and eventually x/x != 1 so "NaN" results appear. I'm solving it and will upload it, but remember multibeam interpolates distances so you will get bad simulation with 10º increase, try using virtualrangesensors

Javier Perez gravatar image Javier Perez  ( 2016-07-13 05:48:55 -0500 )edit

Thank you so much for your rely. It is really helpful.

ZYS gravatar image ZYS  ( 2016-07-13 21:54:26 -0500 )edit

Question Tools

1 follower


Asked: 2016-02-25 08:35:43 -0500

Seen: 138 times

Last updated: Feb 25 '16