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

[Hydro] Error in move_base.launch rviz

asked 2014-08-05 02:18:57 -0600

Moda gravatar image

updated 2014-08-27 03:09:47 -0600

I succed finally to launch my move_base.launch file. And when with rviz I tried to tell where the robot is in the map, with the 2d Pose Estime, i got this message :

Failed to transform initial pose in time (Lookup would require extrapolation into the future.  Requested time 1407222627.317546291 but the latest data is at time 1407222627.301636934, when looking up transform from frame [map] to frame [base_link])

I think that there is a link with my previous problem http://answers.ros.org/question/18796...

This is my view_frames image description

My local costmap is :

local_costmap:
  global_frame: /odom
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05

My global costmap is global_costmap: global_frame: /map robot_base_frame: base_link update_frequency: 5.0 static_map: true

The link beetween map and /odom is done in the move_base.launch file :

  <node pkg="tf" type="static_transform_publisher" name="odom_map_broadcaster" args="0 0 0 0 0 0 /map /odom 100" />

When I launched roswtf i got this error

Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
Static checks summary:

No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
running tf checks, this will take a second...
... tf checks complete

Online checks summary:

Found 3 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:
 * /amcl:
   * /tf_static
   * /clock
   * /initialpose
   * /scan
 * /robot_state_publisher:
   * /joint_states
 * /rpid_velocity:
   * /rwheel
 * /diff_tf:
   * /lwheel
   * /rwheel
 * /map_server:
   * /clock
 * /odom_map_broadcaster:
   * /clock
 * /move_base:
   * /move_base_simple/goal
   * /tf_static
   * /clock
 * /lpid_velocity:
   * /lwheel

WARNING These nodes have died:
 * mark2_arduino-2

WARNING Received out-of-date/future transforms:
 * receiving transform from [/robot_state_publisher] that differed from ROS time by 1407396264.96s
 * receiving transform from [/diff_tf] that differed from ROS time by 1407396264.45s


Found 1 error(s).

Update The new tf view_frames

image description

edit retag flag offensive close merge delete

Comments

1) are you by chance using your system clock to set time stamps to any of your transform messages? Your computers system clock isn't same as ros::time since ros time starts from the year 1970. That could be one explanation for the huge time difference it is telling you you are having.

l0g1x gravatar image l0g1x  ( 2014-08-07 07:46:14 -0600 )edit

2) I know you said you are building your own map when I asked if you are using bagged data, but are you sure your not just using recorded wheel odometry and scan data? And building your own map off of replaying that bag file?

l0g1x gravatar image l0g1x  ( 2014-08-07 08:11:32 -0600 )edit

Whether you are using bag data or not, try setting the use_sim_time parameter to true for your mapping node. This will use the ros simulation time rather then whatever time you are currently using. If that still doesn't work, send me a e-mail and we will figure out things from there.

l0g1x gravatar image l0g1x  ( 2014-08-07 08:13:47 -0600 )edit

Sorry it doesn't work

Moda gravatar image Moda  ( 2014-08-09 11:19:23 -0600 )edit
1

email me and i will help you figure this out. krgebis AT gmail DOT com

l0g1x gravatar image l0g1x  ( 2014-08-11 10:45:43 -0600 )edit

Setting use_sim_time on a real robot WILL mess things up.

ahendrix gravatar image ahendrix  ( 2014-08-21 13:17:22 -0600 )edit

No sorry, even without use_sim_time, i have the very same error

Moda gravatar image Moda  ( 2014-08-22 02:57:21 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2014-08-20 11:13:23 -0600

ahendrix gravatar image

updated 2014-08-21 13:15:54 -0600

Which frame are you publishing position estimates in? You should make sure that the rviz 2D pose estimate tool is set to publish position estimates in the map frame.

UPDATE

The complaint receiving transform from [/robot_state_publisher] that differed from ROS time by 1407396264.96s suggests that you have some nodes which are using sim time, and some which are not. You absolutely SHOULD NOT have the /use_sim_time parameter set on a real robot.

edit flag offensive delete link more

Comments

How can I check that pose estimate is publish in the right frame?

Moda gravatar image Moda  ( 2014-08-20 11:26:30 -0600 )edit

However, when I made a pose estimate, this had been published in the terminal : [ INFO] [1408552044.916830213]: Setting pose: 0,161 2,930 2,263 [frame=map] So I think that I'm publishing in the right frame

Moda gravatar image Moda  ( 2014-08-20 11:30:24 -0600 )edit

The rivz "Tool Properties" panel allows you to configure the 2D pose estimate tool. You should be able to echo the /initialpose topic to confirm which frame is being used.

ahendrix gravatar image ahendrix  ( 2014-08-20 11:31:36 -0600 )edit

When I made rostopic echo /initialpose i got this

header: 
  seq: 3
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: map
pose: 
  pose: 
    position: 
      x: 0.281967163086
      y: 3.63046169281
      z: 0.0
Moda gravatar image Moda  ( 2014-08-20 11:56:13 -0600 )edit

orientation: x: 0.0 y: 0.0 z: 0.912528928351 w: 0.409012169652 covariance: [0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06853891945200942]

Moda gravatar image Moda  ( 2014-08-20 11:57:48 -0600 )edit

So, is this good?

Moda gravatar image Moda  ( 2014-08-20 11:58:14 -0600 )edit

That looks good. Are you sure that the message you're receiving is actually causing problems? Do you know which node it's coming from?

ahendrix gravatar image ahendrix  ( 2014-08-20 12:04:10 -0600 )edit

When I made pose estimate i got this

[ WARN] : Failed to transform initial pose in time (Lookup would require extrapolation into the future.  Requested time 1408553779.104397674 but the latest data is at time 1408553779.067091941, when looking up transform from frame [map] to frame [base_link])
Moda gravatar image Moda  ( 2014-08-20 12:06:22 -0600 )edit
1

answered 2014-08-19 19:35:55 -0600

AsifA gravatar image

I guess the issue is broadcast frequency of odom. Publishing it with 50Hz will probably work.

edit flag offensive delete link more

Comments

It doesn't work, i still have the same error, even if i changed the publishing rate I posted my updated tf view_frames

Moda gravatar image Moda  ( 2014-08-20 04:44:52 -0600 )edit
1

answered 2014-08-05 11:09:54 -0600

l0g1x gravatar image

I'm not sure how you transform from Odom to map within your mapping node, but that is definitely where your error is occurring. Here is a similar post: http://answers.ros.org/question/164911/move_base-and-extrapolation-errors-into-the-future/

edit flag offensive delete link more

Comments

But he is trying to change a file named goal_functions.cpp and I don't have it, so what to do?

Moda gravatar image Moda  ( 2014-08-06 02:58:37 -0600 )edit
1

answered 2014-08-05 08:29:38 -0600

l0g1x gravatar image

What is your local and global costmap parameters set to?

Also can you post a snippet of your code for where you publish the Odom-> map transform, as well as the baselink -> Odom transform?

It will help me better diagnose your problem.

edit flag offensive delete link more

Comments

Are you using bagged data? (rosbag play)?

l0g1x gravatar image l0g1x  ( 2014-08-05 10:42:56 -0600 )edit

No I build my own map.

Moda gravatar image Moda  ( 2014-08-05 10:45:37 -0600 )edit

Have you tried decreasing your rate at which the transform happens between then children of base_link and base_link itself? instead of 50 hz, turn them all to 10 as well so that your que doesnt get filled up. Try that and let me know

l0g1x gravatar image l0g1x  ( 2014-08-06 11:18:26 -0600 )edit

also after everything is running, run "roswtf" in your terminal and let me know if there is any errors

l0g1x gravatar image l0g1x  ( 2014-08-06 11:20:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-05 02:18:57 -0600

Seen: 3,168 times

Last updated: Aug 27 '14