Robotics StackExchange | Archived questions

tf error: could not find connection between world and odom...

Hello,

I am trying to make hector quadrotor use viso2ros ,, after having configured correctly ( monoodometer of viso2ros takes in image from frontcam of hector) , I got warning that viso2ros couldn't find the mapping *baselink* to frontcamoptical_frame and in the rviz of hector simulation, when I tried to add show pose parameter , it outputted 'couldn't find connection between world and odom...'

ok now I checked using tf view_frames

and this is what I got

image description

ok maybe it was because of the lack of link between baselink and forntcamopticalframe,,

I linked both using some code

#include <ros/ros.h>
  #include <tf/transform_broadcaster.h>

  int main(int argc, char** argv){
 ros::init(argc, argv, "hector_remapping_tf");
 ros::NodeHandle n;

ros::Rate r(100);

 tf::TransformBroadcaster broadcaster;

 while(n.ok()){
   broadcaster.sendTransform(
     tf::StampedTransform(
       tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.0, 0.0, -0.2)),
       ros::Time::now(),"base_link", "front_cam_optical_frame"));
   r.sleep();
 }
}

now the warning of lack of baselink to frontcamopticalframe was gone but still the world and odom frame are not linked (checked using tf view_frames and rviz)

Asked by creative_cimmons on 2015-06-28 23:51:21 UTC

Comments

Do you have a localization node running (e.g. amcl)? viso2_ros does, as far as I realize, only provide visual odometry, i.e. the /odom -> /base_link transform. Thus you need a node which provides the /world or /map (whatever it's called in your case) -> /odom transform.

Asked by mgruhler on 2015-06-29 00:52:26 UTC

mig, as i wont't have any drift errors ( UAV ) i thought of mapping map frame to odom frame instead of localization. ( unfortunately amcl only supports if its sensor is LIDAR based). Is there any easy route or do I have to write a listener-publisher of frames.

Asked by creative_cimmons on 2015-07-08 18:26:45 UTC

ok i guess I found it, it was simple assignment of param values. param name="odom_frame" value="odom"/ param name="world_frame" value="odom"/

Asked by creative_cimmons on 2015-07-08 18:52:46 UTC

jep, this would work.

Asked by mgruhler on 2015-07-10 00:56:43 UTC

Answers