Our robot only goes forward and backward after adding static_transform_publisher
Hello everyone, Me and my friend are working with LeoRover in simulation. After getting errors in Rviz which you can see below in links, we added statictransform_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/pleasedimportantarchaeopteryx
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>
Asked by kostasoderoglou on 2022-02-16 07:19:45 UTC
Comments
It looks like you have a problem with the odometry. How do you publish the odom -> base_link transform?
Asked by lukicdarkoo on 2022-02-17 10:20:06 UTC
Hello sir, sorry for the late reply. This is where we publish odom data.
https://justpaste.it/4gd7k
Asked by kostasoderoglou on 2022-02-26 02:50:01 UTC