Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No tranfrom from links to odom in rviz

I built an URDF model from scratch and launched successfully in gazebo. Then i added the differential_drive and joint_state plug-ins to the urdf model as follows

<gazebo>
<plugin name="differential_drive_controller"
    filename="libgazebo_ros_diff_drive.so">
    <leftJoint>Wheel_L</leftJoint>  
    <rightJoint>Wheel_R</rightJoint>
    <robotBaseFrame>base_plate</robotBaseFrame>
    <wheelSeparation>0.235</wheelSeparation>
    <wheelDiameter>0.12</wheelDiameter>
    <publishWheelJointState>true</publishWheelJointState>
    </plugin>
<plugin name="joint_state_publisher"
    filename="libgazebo_ros_joint_state_publisher.so">
    <jointName>Castor_F, Castor_R</jointName>
    </plugin>       
</gazebo>

Finally i launched the model in Gazebo and when visualized in rviz, there comes the error "no transform from [links] to [odom]" ref the image below

image description

The bizarre is the error doesn't occur when the fixed frame is set to any links. I have launched the empty world and spawned the robot in it. I have also launched robot_state_publisher and below is my launch file

<launch>
 <param name="robot_description" textfile="$(find jmbot_description)/urdf/jmbot.urdf" />  
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find jmbot_gazebo)/worlds/jmbot.world"/>
    <!-- more default parameters can be changed here -->
  </include>
<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find jmbot_description)/urdf/jmbot.urdf -urdf -z 1 -model jmbot" />
   <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
</launch>

No tranfrom from links to odom in rviz

I built an URDF model from scratch and launched successfully in gazebo. Then i added the differential_drive and joint_state plug-ins to the urdf model as follows

<gazebo>
<plugin name="differential_drive_controller"
    filename="libgazebo_ros_diff_drive.so">
    <leftJoint>Wheel_L</leftJoint>  
    <rightJoint>Wheel_R</rightJoint>
    <robotBaseFrame>base_plate</robotBaseFrame>
    <wheelSeparation>0.235</wheelSeparation>
    <wheelDiameter>0.12</wheelDiameter>
    <publishWheelJointState>true</publishWheelJointState>
    </plugin>
<plugin name="joint_state_publisher"
    filename="libgazebo_ros_joint_state_publisher.so">
    <jointName>Castor_F, Castor_R</jointName>
    </plugin>       
</gazebo>

Finally i launched the model in Gazebo and when visualized in rviz, there comes the error "no transform from [links] to [odom]" ref the image below

image description

The bizarre is the error doesn't occur when the fixed frame is set to any links. I have launched the empty world and spawned the robot in it. I have also launched robot_state_publisher and below is my launch file

<launch>
 <param name="robot_description" textfile="$(find jmbot_description)/urdf/jmbot.urdf" />  
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find jmbot_gazebo)/worlds/jmbot.world"/>
    <!-- more default parameters can be changed here -->
  </include>
<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find jmbot_description)/urdf/jmbot.urdf -urdf -z 1 -model jmbot" />
   <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
</launch>