Gazebo | Ignition | Community
Ask Your Question
0

Providing a link between gazebo plugins and base_link in the robot model [closed]

asked 2016-05-10 11:27:55 -0500

MahsaP gravatar image

Hi,

I have added the following plugins to my .gazebo file. When I do rostopic echo for all the topics, all the information about poses are updated. My problem is that when I do "rosrun tf view_frames", there is no link between odom and base_link. I would like to update the information of what I got from Gazebo into rviz tf tree. So, do I need to add some tags to the plugins in .gazebo file? Or do I need to add some links in the urdf file?

<gazebo> <!-- GPS plugin -->
<plugin name="robot_gps_sim" filename="libhector_gazebo_ros_gps.so">
  <alwaysOn>true</alwaysOn>
  <updateRate>4.0</updateRate>
  <bodyName>base_link</bodyName>
  <topicName>gps</topicName>
  <velocityTopicName>gps_velocity</velocityTopicName>
  <drift>5.0 5.0 5.0</drift>
  <gaussianNoise>0.1 0.1 0.1</gaussianNoise>
  <velocityDrift>0 0 0</velocityDrift>
  <velocityGaussianNoise>0.1 0.1 0.1</velocityGaussianNoise>
</plugin>

<!-- Groundtruth plugin -->
<plugin name="robot_groundtruth_sim" filename="libgazebo_ros_p3d.so">
  <alwaysOn>true</alwaysOn>
  <updateRate>100.0</updateRate>
  <bodyName>base_link</bodyName>
  <topicName>odom</topicName>
  <gaussianNoise>0.0</gaussianNoise>
  <frameName>map</frameName>
  <xyzOffsets>0 0 0</xyzOffsets>
  <rpyOffsets>0 0 0</rpyOffsets>
</plugin> 

<!-- IMU plugin -->
<plugin name="robot_imu_sim" filename="libhector_gazebo_ros_imu.so">
    <alwaysOn>true</alwaysOn>
    <updateRate>100.0</updateRate> 
    <bodyName>base_link</bodyName>
    <frameID>robot_link1</frameID>
    <topicName>robot/IMU</topicName>
    <xyzOffset>0.0 0.0 0.0</xyzOffset>
    <rpyOffset>0.0 0.0 0.0</rpyOffset>
    <gaussianNoise>0</gaussianNoise>
    <accelDrift>0.5 0.5 0.5</accelDrift>
    <accelGaussianNoise>0.35 0.35 0.3</accelGaussianNoise>
    <rateDrift>0.0 0.0 0.0</rateDrift>
    <rateGaussianNoise>0.00 0.00 0.00</rateGaussianNoise>
    <headingDrift>0.0</headingDrift>
    <headingGaussianNoise>0.00</headingGaussianNoise>
</plugin> </gazebo>

Actually, I asked another questionin answers.ros.org, but I am not sure whether the problem has to do with the the way I have defined the plugins for gazebo.

Thank you.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by MahsaP
close date 2016-06-04 07:38:38.530482

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-18 03:12:59 -0500

Brosseau.F gravatar image

I am using the gazebo_ros diff drive plugin and there is the following code which publish a transform between the world and the vehicle.

transform_broadcaster_->sendTransform (
            tf::StampedTransform ( base_footprint_to_odom, current_time,
                               odom_frame, base_footprint_frame ) );

My odometry frame is "world" and the robotBaseFrame is "vehicle" (which correspond to the base link of my robot).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-10 11:27:55 -0500

Seen: 2,870 times

Last updated: May 18 '16