ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Laser Scan rotates with the robot in RVIZ

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

anonymous user

Anonymous

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"?>
<launch>

  <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/maze.world"/>
    <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"/>
  </include>

  <!-- 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>



  <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"/>


</launch>

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

Comments

Hi! I was wondering if you eventually fixed this problem, since I am facing the exact same one.

Daenerys gravatar image Daenerys  ( 2021-06-12 13:28:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Question Tools

2 followers

Stats

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

Seen: 1,165 times

Last updated: Jul 31 '20