Actor odometry using gazebo_ros_p3d

asked 2018-03-05 09:26:12 -0600

rloka gravatar image

Hi,

I am trying to get Actor odometry info using a gazebo_ros_p3d plugin. Plugin is inserted into .world file like so, and launched in gazebo with roslaunch:

  <plugin name="actor_01_odometry_spine" filename="libgazebo_ros_p3d.so">
    <robotNamespace>actor</robotNamespace>
    <alwaysOn>true</alwaysOn>
    <updateRate>100.0</updateRate>
    <bodyName>Spine</bodyName>
    <topicName>actor_01_odometry_spine</topicName>
    <gaussianNoise>0.01</gaussianNoise>
    <frameName>map</frameName>
    <xyzOffsets>0 0 0</xyzOffsets>
    <rpyOffsets>0 0 0</rpyOffsets>
  </plugin>

When I echo the topic I get right position but speed (twist) revolves around zero, as shown here:

  ---
header: 
  seq: 24979
  stamp: 
    secs: 475
    nsecs: 959000000
  frame_id: "map"
child_frame_id: "Spine"
pose: 
  pose: 
    position: 
      x: -3.82574642252
      y: 0.589185419343
      z: 0.495070912116
    orientation: 
      x: -0.784613931053
      y: -0.00635248099696
      z: -0.101631091917
      w: 0.611564997641
  covariance: [0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001]
twist: 
  twist: 
    linear: 
      x: 0.0137931422544
      y: 0.00601130576374
      z: 0.0267578801175
    angular: 
      x: -0.0189035052545
      y: 0.00271631246327
      z: 0.00557373148548
  covariance: [0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001]

How do I get correct speed?

I am using Kinetic with Gazebo 8 on Ubuntu 16.04.

edit retag flag offensive close merge delete

Comments

1

Can you post the full file where you pasted the <plugin> snippet, and the urdf for the robot?

stevejp gravatar imagestevejp ( 2018-03-05 11:43:46 -0600 )edit