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

robot_localization wrong output

asked 2017-03-31 05:44:49 -0600

Roman Portela gravatar image

I am trying to use an ekf_localization_node to fuse two sensors, odometry and pose, with the package robot_localization, in two dimensions. However, the output (published in the topic /odometry/filtered) seems to be wrong, since it is constantly moving and rotating even when the robot is still. Moreover, the odometry is always 0 without error, because I am using rqt_publisher to manually publish the topic /example/odom.

When I move the robot, the output follows that move, but when the robot doesn't move anymore, the output continues with that last movement. For example, if I twist the robot clockwise, the output is also twisted clockwise with the same velocity. However, when I stop twisting the robot, the output keeps twisting forever with the same velocity. The same happens with possition: if I move the robot forward, the output continues moving forever with the same velocity.

Can you help me with this?

I am new in ROS, so maybe I didn't understand some basic concepts.

You will find the launch file and the YAML file below, as well as some examples of the topics published. As I said, I am new in ROS, so I can't upload files yet. I'll copy-paste them. I can't upload an image of the output of the 'rosrun rqt_tf_tree rqt_tf_tree' command, but I can tell you that odom is linked to base_link, and the children of base_link are odometry and pozyx_frame.

This is the YAML file:

    frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0

transform_timeout: 0.0
print_diagnostics: true

debug: true
debug_out_file: /path/to/debug/file.txt
publish_tf: true
publish_acceleration: false



map_frame: map              # Defaults to "map" if unspecified
odom_frame: odom            # Defaults to "odom" if unspecified
base_link_frame: base_link  # Defaults to "base_link" if unspecified
world_frame: odom           # Defaults to the value of odom_frame if unspecified


odom0: example/odom
odom0_config: [true,  true,  false,
               false, false, false,
               true, true, false,
               false, false, true,
               true, true, false]
odom0_queue_size: 2

odom0_nodelay: false
odom0_differential: false

odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1


pose0: /pozyx_pose
pose0_config: [true,  true,  false,
               false, false, true,
               false, false, false,
               false, false, false,
               false, false, false]
pose0_differential: false
pose0_relative: true
pose0_queue_size: 5
pose0_nodelay: false


use_control: false
stamped_control: false
control_timeout: 0.2
control_config: [false, false, false, false, false, false]
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.5, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0.5, 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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-04 02:38:34 -0600

Tom Moore gravatar image

updated 2017-05-04 02:41:03 -0600

A bunch of things:

  1. Turn off debug mode. It won't be able to write to that file anyway, but it should still be false.
  2. For example/odom, you have the frame_id in your message set to odometry, yet your world_frame for the EKF is set to odom. You need to make the frame_id in example/odom odom, or provide an odometry->odom transform.
  3. Moreover, for example/odom, you have no child_frame_id set, yet you are trying to fuse the velocity data from it.
  4. Remove odom0_pose_rejection_threshold and odom0_twist_rejection_threshold. Those are advanced parameters that should not be used until everything else is functioning as you expect (I rarely use them).
  5. The diagnostics topic has some valuable information. You set X and Y to true in the EKF for both odom0 and pose0, and they clearly don't agree, so the output going to behave very strangely.
  6. If you already have a valid source of pose data (pose0), why are you feeding the filter fake odometry messages? It seems to me that you should just get rid of odom0.

I would recommend reviewing the tf wiki and the r_l wiki as well.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-31 04:24:40 -0600

Seen: 1,398 times

Last updated: May 04 '17