0
$\begingroup$

Rosanswers logo

I am trying to use the ukf node in the robot_localization but this node is not publishing the transform from the frame map to odom and the following error message appear: Could not obtain transform from odom to map. Error was "map" passed to lookupTransform argument target_frame does not exist. My config file is the following:

frequency: 30

sensor_timeout: 0.1

two_d_mode: true

transform_time_offset: 0.0

transform_timeout: 0.0

print_diagnostics: true

debug: false

debug_out_file: ~/.ros/robot/rDebug.log


map_frame: map             
odom_frame: odom            
base_link_frame: base_link  
world_frame: map           


odom0: odom


odom0_config: [true,  true,  false,
               false, false, true,
               false, false, false,
               false, false, false,
               false, false, false]


odom0_queue_size: 2


odom0_nodelay: false


odom0_differential: false


odom0_relative: false


odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1


pose0: pose
pose0_config: [true,  true,  false,
               false, false, true,
               false, false, false,
               false, false, false,
               false, false, false]
pose0_differential: true
pose0_relative: false
pose0_queue_size: 5
pose0_rejection_threshold: 2  
pose0_nodelay: false


use_control: true

stamped_control: false

control_timeout: 0.2

control_config: [true, false, false, false, false, true]

acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4]

deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5]

acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9]

deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0]


process_noise_covariance: [0.05, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0.05, 0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0.06, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0.03, 0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0.03, 0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0.06, 0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0.025, 0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0.025, 0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0.04, 0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0.01, 0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.01, 0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.02, 0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.01, 0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.01, 0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.015]


initial_estimate_covariance: [1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    1e-9, 0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9,  0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     1e-9,  0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     1e-9,  0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     1e-9, 0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    1e-9, 0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    1e-9]


alpha: 0.001

kappa: 0

beta: 2

My inputs are odometry and a PoseWithCovarianceStamped. The frame_ids in the message does not have slashes. Odometry/filtered is not being published as well. All other transformations are okay including odom->base_link. What am I doing wrong? Is it possible to use the robot_localization package having a known map and a laser scan?

Update:

I am using the differential drive gazebo plugin to generate the odom->base_link transform.

Input_messages:

Odometry input message:

header: 
  seq: 346
  stamp: 
    secs: 34
    nsecs: 723000000
  frame_id: odom
child_frame_id: base_link
pose: 
  pose: 
    position: 
      x: 3.09824971028e-06
      y: -4.12930698334e-11
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: -0.000308331906876
      w: 0.999999952466
  covariance: [1e-05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001]
twist: 
  twist: 
    linear: 
      x: -6.59023772555e-06
      y: 4.06376386433e-09
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: -6.0041686542e-05
  covariance: [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.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

Pose input message:

header: 
  seq: 88
  stamp: 
    secs: 110
    nsecs:  20000000
  frame_id: odom
pose: 
  pose: 
    position: 
      x: 0.0339823272081
      y: -0.0283254735522
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: -0.000438910551745
      w: 0.999999903679
  covariance: [1.4186971384333447e-05, -2.3090090053301537e-06, 0.0, 0.0, 0.0, 0.0, -2.309008550582803e-06, 1.7632721210247837e-05, 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, 1.844621237978572e-06, 0.0, 0.0, 0.0, 0.0, 0.0, -3.6789799651160138e-06, 0.0, 0.0, 0.0, 1.844621237978572e-06, -3.678979510368663e-06, 2.932679535661009e-06]

Originally posted by agbj on ROS Answers with karma: 83 on 2017-03-29

Post score: 0


Original comments

Comment by Tom Moore on 2017-04-11:
Can you please change the formatting of your config file to use the code formatting (tiny box with ones and zeros)? Also, please post a sample message from every input. What are you using to generate the odom->base_link transform?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Your question is already answered here:

Using robot_localization with amcl


Originally posted by Orhan with karma: 856 on 2017-04-07

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by agbj on 2017-04-10:
Thank you for the answer but to publish both the pose and odometry in the same frame to get the transform from map to odom. I think i have to publish the odometric information in the map frame. Correct me if I am wrong. But the node that publishes the odometry does not know how to transform the pose

Comment by Orhan on 2017-04-10:
That thing explained in the link above. If you tune correctly (remappings etc.) It publishes transforms between frames automatically.

Comment by agbj on 2017-04-10:
The frame between map and odom is being published by the ukf node, but it is incorrect because in rviz the robot just stands still and i think it is because I am publish both the pose and odometry in the odom frame. When I use only my localization node the robot is able to localize itself reasonably

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.