Ask Your Question

JorgeArino's profile - activity

2019-05-20 09:04:47 -0600 received badge  Enlightened (source)
2019-05-20 09:04:47 -0600 received badge  Good Answer (source)
2017-08-17 02:35:17 -0600 received badge  Nice Answer (source)
2016-09-08 02:16:25 -0600 answered a question How to install hokuyo_node/urg_node on kinetic?

You will need to install and compile driver_base from sources too

git clone

First compile driver_common and then you should be able to compile hokuyo_node

2015-06-12 11:38:59 -0600 received badge  Student (source)
2015-03-13 05:18:47 -0600 answered a question Where to configure the detecting range of urg_node?

You could use the LaserScanRangeFilter of the laser_filters package.

2015-03-10 11:07:33 -0600 received badge  Teacher (source)
2015-03-10 10:35:31 -0600 answered a question Roslaunch arguments problems

I'm not sure about that but I think you can't use the "~" to define your home directory in a launch file. You could try something like:

    <node name="teste_aruco" pkg="teste_aruco" type="ros_aruco2" args="live $(find ros_aruco)/data/logitech_9000_intrinsics.yml 0.127" />

or use the full path to the .yml file.

2015-02-23 16:41:21 -0600 received badge  Famous Question (source)
2015-01-07 17:30:43 -0600 received badge  Notable Question (source)
2014-12-22 01:15:27 -0600 received badge  Popular Question (source)
2014-12-19 09:32:29 -0600 asked a question Robot localization using AR tags


I am trying to make a robot localization system using AR tags positioned on the ceiling. For that I am using the ar_track_package, a Turtlebot2 robot, and a Kinect pointing upwards. The idea is to get and publish the transformation map->odom, using the fixed transformation map->ar_marker, and the transformation camera->ar_marker, obtained from the ar_track_alvar node.

This is the tf tree of the system I am using.

This is a part of the code I'm using to get and publish the map->odom transformation. The full code is here.

const tf::Quaternion quaternion(qr_positions_vector_[i].pose.orientation.x, qr_positions_vector_[i].pose.orientation.y, qr_positions_vector_[i].pose.orientation.z, qr_positions_vector_[i].pose.orientation.w);

const tf::Vector3 position(qr_positions_vector_[i].pose.position.x, qr_positions_vector_[i].pose.position.y, qr_positions_vector_[i].pose.position.z);      

tf::Transform map_to_qr(quaternion, position);

// 1. get inverse of map->qr to obtain qr->map
tf::Stamped<tf::Pose> qr_to_map_stamped (map_to_qr.inverse(), qr_pose_time, qr_frame);

// 2. get transform odom->map,  transforming qr->map to odom frame
tf::Stamped<tf::Pose> odom_to_map;

  bOK = true;

  tf::StampedTransform odom_to_qr;
  tf_listener_->lookupTransform(odom_frame, qr_frame, qr_pose_time, odom_to_qr);

  // get required transform 
  tf_listener_->transformPose( odom_frame, qr_to_map_stamped, odom_to_map);

catch (tf::TransformException ex){
  bOK = false;

  // 3. get the inverse of odom->map to obtain map->odom 
  tf::Transform map_to_odom(tf::Quaternion(odom_to_map.getRotation()), tf::Point(odom_to_map.getOrigin()));    

  tf::StampedTransform map_to_odom_stamped(map_to_odom.inverse(), qr_pose_time, map_frame, odom_frame);   

  // 4. ignore z position
  map_to_odom_stamped.setOrigin(tf::Vector3(map_to_odom_stamped.getOrigin().x(),   map_to_odom_stamped.getOrigin().y(),0.0));

  // 5. set rotation in x,y to 0
  float yaw = getYaw(map_to_odom_stamped.getRotation());

  // publish map->odom as a geometry_msgs/PoseWithCovarianceStamped
  qr_pose_msg_ = get_msg_from_tf(map_to_odom_stamped);

  // publish transform map->odom on the tf tree

} // end if(bOK)

The problem I have is that I only get an proximation of the localization of the robot. Sometimes works relatively well, but most of the time the map->odom transformation has a variation of 1 meter aprox, or even more. I would expect to have more accurate results because the camera->ar_marker (and the odom->camera) transformations are very accurate and they only have a variation of 1 or 2 cm.

Here is a short video of rviz with the problem I'm having. And here is a bag file with the topics used.

My guess is that something weird is happening with the tf times when requesting the transformation with transformPose(...), but I haven't found any solution yet to the problem.

Any help or hint would be appreciated.


2014-12-11 03:17:06 -0600 received badge  Enthusiast
2014-08-22 11:16:51 -0600 received badge  Supporter (source)