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

Navigation for Pepper: Cannot transform from map to base_footprint

asked 2016-09-27 22:58:47 -0600

JasonYang gravatar image

updated 2016-09-30 00:45:05 -0600

gvdhoorn gravatar image

I'm trying to run AMCL for auto navigation with the robot Pepper. And I used the map that built by TurtleBot(gmapping). the result is shown as follow picture: image description and the frame tree file is here It can load the map, and can set the initial position by 2D Postion estimate but when I set the 2D Navigation Goal, the robot bring up node out comes the message:

Cannot transform from map to base_footprint

My navigation launch file are follow:

  1. pepper_navagation.launch

    <launch>
        <!-- Set the name of the map yaml file: can be overridden on the command line. -->
        <arg name="map" default="/home/axmros/tmp/office0614.yaml" />
        <!-- Run the map server with the desired map -->
        <node name="map_server" pkg="map_server" type="map_server" args="$(arg map)"/>
        <include file="$(find pepper_navigation)/launch/includes/amcl.launch.xml"/>
    </launch>
    
  2. amcl.launch.xml

    <launch>
      <arg name="use_map_topic"   default="1"/>
      <arg name="scan_topic"      default="/pepper_robot/laser"/> 
      <arg name="odom_frame_id"   default="odom"/>
      <arg name="base_frame_id"   default="base_footprint"/>
      <arg name="global_frame_id" default="map"/>
    
      <node pkg="amcl" type="amcl" name="amcl">
        <param name="use_map_topic"             value="$(arg use_map_topic)"/>
        <!-- Publish scans from best pose at a max of 10 Hz -->
        <param name="gui_publish_rate"          value="0.5"/>
        <param name="transform_tolerance"       value="0.02"/>
        <param name="laser_max_beams"           value="61"/> 
        <param name="laser_max_range"       value="5.0"/>
        <param name="min_particles"         value="1000 * 4"/>
        <param name="max_particles"         value="5000 * 4"/>
        <param name="odom_model_type"           value="omni"/>
        <param name="resample_interval"         value="8"/>
        <param name="odom_alpha1"           value="1.1"/>
        <param name="odom_alpha2"           value="1.1"/>
        <param name="odom_alpha3"           value="10.0"/>
        <param name="odom_alpha4"           value="0.1"/>
        <param name="odom_alpha5"           value="0.1"/>
        <param name="laser_model_type"      value="likelihood_field"/>
        <param name="laser_likelihood_max_dist" value="4.0"/>
        <param name="update_min_d"          value="0.05"/>
        <param name="update_min_a"          value="0.02"/>
        <param name="recovery_alpha_slow"       value="0.0"/>
        <param name="recovery_alpha_fast"       value="0.0"/>
        <param name="laser_z_rand"          value="0.05"/>
        <param name="laser_z_hit"           value="0.95"/>
        <param name="laser_sigma_hit"       value="0.2"/>
        <param name="laser_z_short"         value="0.01"/>
        <param name="laser_z_max"           value="0.01"/>
    
        <param name="odom_frame_id"             value="$(arg odom_frame_id)"/> 
        <param name="base_frame_id"             value="$(arg base_frame_id)"/> 
        <param name="global_frame_id"           value="$(arg global_frame_id)"/>
        <remap from="scan"                      to="$(arg scan_topic)"/>
      </node>
    </launch>
    

and the robot can't move, if I set the global frame id ad base_link or base_footprint, the robot can move but the odom can not match with the map. So what should I do to fix the problem?


Edit: At the beginning, I thought is the TF set problem, but when I run: tf_echo, everything is right.

axmros@axmros:~$ rosrun tf tf_echo /map /base_footprint

At time 1475199964.917
- Translation: [0.032, -0.007, -0.820]
- Rotation: in Quaternion [-0.004, -0.016, 0.000, 1.000]
     in RPY (radian) [-0.008, -0.033, 0.000]
     in RPY (degree) [-0.440, -1.867, 0.024]

At time 1475199964.917
- Translation: [0.032, -0.007, -0.820]
- Rotation: in Quaternion [-0.004, -0.016, 0.000, 1.000]
        in RPY (radian) [-0.008, -0.033, 0.000]
        in RPY (degree) [-0.440, -1.867, 0 ...
(more)
edit retag flag offensive close merge delete

Comments

I've given you some karma. Please edit your question to include all the relevant bits directly, instead of linking to external file services.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-28 00:44:07 -0600 )edit

thanks for you help, I have upload the rviz picture, but I can't upload the frame tree map, for it is a PDF document.

JasonYang gravatar image JasonYang  ( 2016-09-28 01:12:52 -0600 )edit

You could render it to PNG and attach that.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-28 01:20:02 -0600 )edit

I have tried, but it is too huge to upload. If convert it to a small one, it is too small to display clearly.

JasonYang gravatar image JasonYang  ( 2016-09-28 02:56:12 -0600 )edit

That could be the case, I hadn't considered that.

Why did you replace the pepper_navagation.launch and amcl.launch.xml contents with an image? My last edit showed it just fine?

gvdhoorn gravatar image gvdhoorn  ( 2016-09-28 03:34:50 -0600 )edit

I want add the contents as code, but It is really hard to edit code in the edit box~~
Now I re-edited back. TKS

JasonYang gravatar image JasonYang  ( 2016-09-28 03:48:40 -0600 )edit

See if this version works for you. No images needed. Just make sure to indent code with at least 4 spaces. When you place code in a list, add another 4 spaces.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-28 04:07:05 -0600 )edit

OK, I see, very very thanks for your help!

JasonYang gravatar image JasonYang  ( 2016-09-28 04:20:26 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-10-20 22:28:40 -0600

Jron gravatar image

Hi ,I am new for ROS and SLAM, also I need to finish SLAM and navigation with PEPPER.So I hope I can ask you some questions,thx. Firstly, the map you used is built by TurtleBot Robot or the Pepper robot with the TurtleBot package? Secondly,how do you solve the issue——"Cannot transform from map to base_footprint"? Thirdly,In the book of ROS BY EXAMPLE, there are some sentences like "some robots like the TurtleBot uses the robot_pose_ekf package to combine wheel odometry and gyro data to get a more accurate estimate of the robot's position and orientation.in this case, it is the robot_pose_ekf node that publishes that publishes the trasform from /odom to /base_footprint."maybe these can help to solve the issue——"if I set the global frame id ad base_link or base_footprint, the robot can move but the odom can not match with the map",not sure just suggest. The last one ,If I want to code for my Pepper,can I copy the turtleBot package and then modify by myself? Hope for your answers,thx a lot.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-27 22:45:12 -0600

Seen: 1,304 times

Last updated: Sep 30 '16