Our robot only goes forward and backward after adding static_transform_publisher

asked 2022-02-16 07:21:08 -0500

kostasoderoglou gravatar image

updated 2022-02-16 09:04:22 -0500

Hello everyone, Me and my friend are working with Leo_Rover in simulation. After getting errors in Rviz which you can see below in links, we added static_transform_publisher to the launch file with this way we fixed those errors but it lead to another error. Now our robot goes only forward and backwards even if we try to turn left or right. I added a gif to show you what our current problem is.

https://pasteboard.co/jMSZVnFuFH7T.png, https://pasteboard.co/39AzluxCTvwd.png https://gfycat.com/pleasedimportantar...

Here is our launch file:

    <launch>

  <arg name="fixed" default="false"/>
  <arg name="robot_ns" default="/"/>
  <arg name="model_name" default="leo"/>
  <arg name="lidar" default="false"/>     
  <arg name="rviz" default="true"/> 

  <arg name="world_name" default="worlds/small_house.world"/>
  <arg name="paused" default="false"/>
  <arg name="gui" default="false"/>
  <arg name="debug" default="false"/>
  <arg name="verbose" default="false"/>

  <!-- 
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(arg world_name)"/>
    <arg name="paused" value="$(arg paused)"/>
    <arg name="gui" value="$(arg gui)"/>
    <arg name="debug" value="$(arg debug)"/>
    <arg name="verbose" value="$(arg verbose)"/>
  </include> 

  -->

  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find gazebo_worlds)/worlds/small_house.world"/>
    <arg name="paused" value="$(arg paused)"/>
    <arg name="gui" value="$(arg gui)"/>
    <arg name="debug" value="$(arg debug)"/>
    <arg name="verbose" value="$(arg verbose)"/>
  </include> 

  <group if = "$(arg rviz)">
    <include file="$(find leo_viz)/launch/rviz.launch"/>
  </group>

  <node pkg="tf" type="static_transform_publisher" name="fake_transform" args="1 0 0 0 0 0 1 map odom 100" />


  <include file="$(find leo_gazebo)/launch/spawn_robot.launch"
           pass_all_args="true"/>
     <arg name="map_file" default="$(find rake_maps)/maps/small_house.yaml"/>

   Run the map server 
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

</launch>
edit retag flag offensive close merge delete

Comments

It looks like you have a problem with the odometry. How do you publish the odom -> base_link transform?

lukicdarkoo gravatar image lukicdarkoo  ( 2022-02-17 09:20:06 -0500 )edit

Hello sir, sorry for the late reply. This is where we publish odom data.

https://justpaste.it/4gd7k

kostasoderoglou gravatar image kostasoderoglou  ( 2022-02-26 01:50:01 -0500 )edit