ros-perception / ar_track_alvar

AR tag tracking library for ROS

Home Page:www.ros.org/wiki/ar_track_alvar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marker position change while robot is moving

dBierni opened this issue · comments

I have the camera on the robot and in ar track Alvar parameters I specified map frame as output - it means I should obtain marker position related to the map.
The problem is if robots move and its position is change in map coordinates, then position of marker change as well, despite the marker is not moving. It happens for both single and bundle markers. Do you have any idea where is the problem? The situation is the same for gazebo simulation and real robot.

Is the position of the markers oscillating or moving away as the robot moves?

If the position of markers is just oscillating; I believe it's because, when the robot is moving the camera image becomes blurry and causes inaccurate marker pose detection (Happened to me). I sort of solved the issue by implementing a filter (EKF) to stabilize the marker pose, considering the robot movement.

Talking about oscillation, it is happens even if robot does not move. I suppose it can be because of camera properties or calibration.
So i will try with EKF , thank you!

@acachathuranga @dBierni
Hi man! I have the same issues on the oscillations of marker. I didn't find a way for implementing the EKF to the pose of the detected marker yet.
On the robot_pose_ekf lauch file, I put ar_marker_2 (remap of odom) as topic to be subscribed, that's a nav_msgs::Odometry message that I simply created by taking the pose values of /ar_pose_marker with a fix covariance (I picked some values on the diagonal).

_robot_pose_ekf lauch_


<launch>

<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
  <param name="output_frame" value="odom_combined"/>
  <param name="base_footprint_frame" value="camera_ar_track"/>
  <param name="freq" value="30.0"/>
  <param name="sensor_timeout" value="1.0"/>  
  <param name="odom_used" value="true"/>
  <param name="imu_used" value="false"/>
  <param name="vo_used" value="false"/>

  <remap from="odom" to="ar_marker_2" />
</node>

</launch>

camera_ar_track is the output frame of the pr2_indiv_no_kinect.launch.
However when I run this launch, even if it doesn't give me errors, it doesn't print the odom_combined message if I execute
$ rostopic echo /robot_pose_ekf/odom_combined

If I put as a remap of odom odom, that is another nav_msgs::Odometry topic, it works fine and it prints the odom topic with a different covariance.

Can someone help me to handle this situation?