Ask Your Question

Laser Scan rotates with the robot in RVIZ

asked 2020-07-30 17:58:45 -0500

JTCase gravatar image

Hello, I am currently working on developing a ROS application for autonomous navigation using AMCl. I am first trying to get move_base to work before continuing with AMCL. I came across an issue that shows the LaserScan rotating in a similar fashion to the robot when I use teleop_twist_keyboard to manually rotate the robot. I am using the rplidar_ros package to run the lidar and the create_autonomy package for controlling the robot. I have tried searching for an issue similar to mine and could not find one.

Hardware: - Robot: iRobot Create 2 - Lidar: RPLidar A1M8 - Computer: Jetson NX with Ubuntu 18 running ROS Melodic

Launch File:

<?xml version="1.0"?>

  <arg name="use_robot" default="true" />
  <arg name="use_gazebo" default="false" />
  <arg name="gui" default="false"/>

  <include if="$(arg use_gazebo)" file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find example_bot_sim)/worlds/"/>
    <arg name="paused" value="false"/>
    <arg name="use_sim_time" value="true"/>
    <arg name="gui" value="$(arg gui)"/>
    <arg name="headless" value="false"/>
    <arg name="debug" value="false"/>
    <arg name="verbose" value="true"/>

  <!-- Spawn Robot 
       This must be the same robot type as the robot application
  <include if="$(arg use_gazebo)" file="$(find example_bot_sim)/launch/spawn_bot.launch">
      <!-- Override arg parameters here e.g,
          <arg name="x_pos" default="10.0"/>
          <arg name="y_pos" default="5.0"/>

  <include if="$(arg use_robot)" file="$(find ca_driver)/launch/create_2.launch" />

  <node pkg="tf" type="static_transform_publisher" name="laser_broadcaster" args="0 0 0 0 0 0  base_link laser 100" />

  <include if="$(arg use_robot)" file="$(find rplidar_ros)/launch/rplidar.launch" />

  <include file="$(find example_bot_sim)/launch/gmapping.launch"/>

  <include file="$(find example_bot_sim)/launch/move_base.launch"/>

  <node pkg="rviz" type="rviz" name="rviz"/>


Initial robot pose:

Robot pose after moving:

rosrun tf view_frames output:

P.S. This is my first time posting on ROS Answers, so suggestions on how to better provide more detail for future problems will be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-31 01:10:20 -0500

Nitesh_j gravatar image
  1. check ur wheel separation distance , is it mentioned properly in ur URDF
  2. try to set update_min_a = 0.2 or 0.1 (of amcl parameter this has worked for me ) link text
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-07-30 17:58:45 -0500

Seen: 24 times

Last updated: Jul 31