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

nav2d_karto map rebuilds with wrong coords

asked 2018-06-21 05:49:40 -0600

artur gravatar image

updated 2018-06-21 05:52:30 -0600

Hey guys, i finally managed to start a turtlebot2 with a lidar laser sensor and the Operator, Mapper and Navigator from the nav2d_tutorial3.

But the map that is built has a weird behavior: First, the map looks normal with the first borders seen, but after i move the robot a little bit (with teleop) the map is somehow rebuild with new coords. As seen in the picture, the lower border in the south of the pic is relocated and turned (its displayed twice). image description

Any ideas for this problem?

I also cant make a proper StartExploring call and i think its associated with this mapping failure.

Heres the launch file:

  <!-- Some general parameters -->
  <rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>
  <param name="/laser_frame" value="base_footprint" />

  <!-- Start the Operator to control the simulated robot -->
  <node name="Operator" pkg="nav2d_operator" type="operator" >
      <remap from="/cmd_vel" to="/mobile_base/commands/velocity" />
      <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>
      <rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" /></node>

  <!-- Start Mapper to genreate map from laser scans -->
  <node name="Mapper" pkg="nav2d_karto" type="mapper">
      <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/></node>

  <!-- Start the Navigator to move the robot autonomously -->
  <node name="Navigator" pkg="nav2d_navigator" type="navigator">
      <rosparam file="$(find nav2d_tutorials)/param/navigator.yaml"/></node>

      <node name="GetMap"  pkg="nav2d_navigator" type="get_map_client" />
      <node name="Explore" pkg="nav2d_navigator" type="explore_client" />
      <node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client" />

  <!-- Start the joystick-driver and remote-controller for operation-->
  <node name="Joystick" pkg="joy" type="joy_node" />
  <node name="Remote" pkg="nav2d_remote" type="remote_joy" />

  <!-- RVIZ to view the visualization -->
  <node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz" />
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-09 04:53:34 -0600

Sebastian Kasperski gravatar image

This usually happens when your odometry gives wrong values (e.g. reports the robot is driving backward). Or your laser is mounted backward or upside down, which is kind of the same thing from the mapper's perspective. So make sure first, that the odometry moves in the direction, that you command the robot to go.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-06-21 05:49:40 -0600

Seen: 457 times

Last updated: Jul 09 '18