osrf / vrx

Virtual RobotX (VRX) resources.
Apache License 2.0
420 stars 189 forks source link

Linear velocity #766

Closed boeun98 closed 8 months ago

boeun98 commented 8 months ago

Hello, guys.

I am a vrx beginner. I want to know the linear velocity of USV. In what topic can I find out the linear velocity of the USV?

and, using 'rostopic pub' I can publish to thruster the data. ex) rostopic pub --once /wamv/thrusters/right_thrust_cmd std_msgs/Float32 "data: 1.0" but I don't know that "data : x.x" I want to know its unit.

System Configuration: Tell us about your system.

caguero commented 8 months ago

You need to write a plugin, and then, within your plugin read the world linear velocity component associated to one of its links.

Relevant tutorial:

https://gazebosim.org/api/sim/8/createsystemplugins.html

See an example from VRX where we're reading the linear velocity from a link:

https://github.com/osrf/vrx/blob/main/vrx_gz/src/SimpleHydrodynamics.cc#L207

boeun98 commented 8 months ago

Then, what is the topic '/wamv/sensor/gps/gps/fix_velocity'?

and Do I have to write a plugin to get linear velocity? (I don't use gazebo sim. I use vrx_2019 ver.)