Ask Your Question
0

Troubles with autonomouse mapping with nav2d and turtlebot 2 - StartExploration Error

asked 2016-07-15 16:05:57 -0500

paddi00 gravatar image

updated 2016-07-26 17:54:52 -0500

Hi,

I just started with ros and don't have much experience. I already installed the the nav2d package.

Like in the tutorial described, I started the command rosservice call /StartMapping 3 and the robot drives 1 meter forward and makes a 180 turn. I don't know if that is correct. Then I start rosservice call /StartExploration 2 and then the following error is given:

Failed to compute odometry pose, skipping scan ("base_laser_link" passed to lookupTransform argument source_frame does not exist. )
[ERROR] [1468626044.630942697]: You must specify at least three points for the robot footprint, reverting to previous footprint.
[ERROR] [1468626142.281016628]: Is the robot out of the map?
[ERROR] [1468626142.281070197]: Exploration failed, could not get ent position.

In my tf tree I can't find the base_laser_link.

You can find my rqt_graph here.

I start my TurtleBot with minimal.launch and I also start my 3D sensor. After that, I start the following launch file. My tutorial3 launch file is:

<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>

<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <!-- <remap from="scan" to="base_scan"/> -->
            <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">
    <!-- <remap from="scan" to="base_scan"/> -->
    <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" />

<!-- RVIZ to view the visualization -->
<node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz" /></launch>

There is also a problem with the rviz virtualization. currently it looks like this.

I hope somebody is able to help me because other questions and answers in this forum didn't help me.

Edit 25. July 16: The new (error) messages are:

[ERROR] [1469487068.001244894]: You must specify at least three points for the robot footprint, reverting to previous footprint.
[ INFO] [1469487068.047285205]: Will publish desired direction on 'route' and control direction on 'desired'.
[ INFO] [1469487068.061046721]: Initializing LUT...
[ INFO] [1469487068.063258093]: ...done!
[ WARN] [1469487068.430814767]: The scan observation buffer has not been updated for 0.47 seconds, and it should be updated every 0.40 seconds.

The new tf-tree looks like this. The map and offset frame disappeared.
Here you can also find my ros.yaml file:

### TF frames #############################################
laser_frame: laser #base_laser_link
robot_frame: base_link
odometry_frame: odom
offset_frame: offset
map_frame: map
### ROS topics ############################################
map_topic: map
laser_topic: scan
### ROS services ##########################################
map_service: static_map

Edit 26. July 2016
In my config files aren't configuration regarding the footprint. The footprint error is really strange because it doen't appear at the first launch of minimal.launch, 3dsensor.launch and tutorial3.launch. At ... (more)

edit retag flag offensive close merge delete

Comments

Sadly, your error message is not there.

Chrissi gravatar imageChrissi ( 2016-07-15 16:34:44 -0500 )edit

oh sorry, I added it.

paddi00 gravatar imagepaddi00 ( 2016-07-15 16:45:02 -0500 )edit

@Sebastian Kasperski As developer of the nav2d package maybe you can help me.

paddi00 gravatar imagepaddi00 ( 2016-07-20 10:28:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-07-25 02:00:59 -0500

Sebastian Kasperski gravatar image

updated 2016-07-26 01:41:11 -0500

You have to set all frame-names according to your robot setup. In your tf-tree the laser frame is called "laser", so you have to set the parameter "laser_frame" in the ros.yaml parameter file from nav2d to just "laser".

Edit:

It looks like you are defining a footprint somewhere that is not correct. As the operator can only handle robot radius (as defined in costmap.yaml), you should check your yaml files and remove this definition. "rosparam list" might also be helpful.

But actually I don't think that this is really your problem. This all happens within the Operator and from your screenshot it seems to be fine. (blue and green trajectory indicator are there) Are there any other error messages? Have you visualized the /scan topic to see if it contains useful data?

In general, I would suggest to follow the tutorials step by step, so:

  1. Add Operator, check that costmap is there and the robot can move safely.
  2. Add Mapper, check that a global map is build and localization is good
  3. Add Navigator, check navigation and autonomous exploration
edit flag offensive delete link more

Comments

Thanks for your answer @Sebastian Kasperski. I changed the laser_frame to laser but it seems that this kills the map and offset frame. --> I added the new tf-tree to the question. I think that's the reason for not receiving a map.

paddi00 gravatar imagepaddi00 ( 2016-07-25 11:43:01 -0500 )edit

@Sebastian Kasperski I edited my question regarding your edit.

When I run rosservice call /StartMapping3 the robot drives through the room without stopping. Normally the robott should do a 360 turn as described in your tutorial.

paddi00 gravatar imagepaddi00 ( 2016-07-26 15:55:33 -0500 )edit

I started rviz with the rviz config file of the gmapping demo and got a costmap as you can see in the picture.

paddi00 gravatar imagepaddi00 ( 2016-07-26 15:56:12 -0500 )edit

Almost all your laser points are outside your costmap, this cannot work. You should really setup your system step by step and test everything before you continue with the next one. You cannot debug the whole system at once.

Sebastian Kasperski gravatar imageSebastian Kasperski ( 2016-07-27 02:59:19 -0500 )edit

Should I follow the 3 steps you supposed or do you mean to set up the complete robot?

paddi00 gravatar imagepaddi00 ( 2016-07-27 08:03:48 -0500 )edit

I mean setting up the robot. Add all the components step be step and verify each before you go on. And if you then run into any troubles, you can ask here,

Sebastian Kasperski gravatar imageSebastian Kasperski ( 2016-07-28 01:10:38 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2016-07-15 15:43:02 -0500

Seen: 653 times

Last updated: Jul 26 '16