Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 74 articles
Browse latest View live

TF Error while running AMCL (turtlebot). Waiting on transform from /base_link to /map to become available before running costmap.

$
0
0
Hi, I have a world in gazebo(fuerte) with turtlebot in it and I have the map of the world too. After launching the world, when I try to launch the launch file described below, I get this warning: `[ WARN] [1366190909.527997203, 40.084000000]: Waiting on transform from /base_link to /map to become available before running costmap, tf error:` Launch File: I made the map of the environment with a turtlebot when I was using electric and I never used to get this warning in electric. After running this launch, when I do `rosrun tf view_frames`, `/map` frame does not show up in the list of frames at all. I referred to the following questions, but I am not able to get the catch. [http://answers.ros.org/question/35844/help-with-navigation-error-transform-from-base_link-to-map/](http://answers.ros.org/question/35844/help-with-navigation-error-transform-from-base_link-to-map/) [http://answers.ros.org/question/9928/transform-from-base_link-to-map-navigation-stack-error/](http://answers.ros.org/question/9928/transform-from-base_link-to-map-navigation-stack-error/) What is the problem here ? Is there file I have to edit before running the launch or am I missing a step ? **Update:** ![image description](/upfiles/1366273207995709.jpg) This is my TF tree (Pls save the image and zoom in for a clearer picture). @Procópio Silveira Stein, I cannot visualise any data on rviz and I am unable to choose the initial pose in rviz. /map frame does not seem to exist at all. I will try few more tricks and update shortly. Thanks, Prasanna

Transform from base_link to odom failed on Stage

$
0
0
I am starting to learn how to program a robot controller on C++. For now, I just want my robot to repetitively travel 1m straight until it runs into an obstacle. When I run my program on Stage, the robot moves 2-3 times, then I receive a `Transform from base_link to odom failed` error message. After that, the robot rotates then go straight 1m for a few times, then rotates, etc. I think a rotation occurs every time the transform fails. Unless this is related to the local planner? I don't understand how the transform would sometimes work and sometimes not. Here is my code: #include #include #include #include #include #include #include using namespace navfn; typedef actionlib::SimpleActionClient MoveBaseClient; int main(int argc, char** argv){ ros::init(argc, argv, "compare"); //tell the action client that we want to spin a thread by default MoveBaseClient client("move_base", true); //wait for the action server to come up while(!client.waitForServer(ros::Duration(5.0)) && ros::ok()){ ROS_INFO("Waiting for the move_base action server to come up"); } move_base_msgs::MoveBaseGoal goal; //we'll send a goal to the robot to move 1 meter forward goal.target_pose.header.frame_id = "base_link"; ros::Rate loop_rate(10); while (ros::ok()) { goal.target_pose.header.stamp = ros::Time::now(); goal.target_pose.pose.position.x = 1.0; goal.target_pose.pose.orientation.w = 1.0; ROS_INFO("Sending goal"); client.sendGoal(goal); client.waitForResult(); if(client.getState() == actionlib::SimpleClientGoalState::SUCCEEDED) ROS_INFO("Hooray, the base moved 1 meter forward"); else ROS_INFO("The base failed to move forward 1 meter for some reason"); ros::spinOnce(); loop_rate.sleep(); } return 0; } Here is my launch file: Compare.xml and move.xml call .yaml files:. compare_costmap: global_frame: /map robot_base_frame: base_link update_frequency: 1.0 publish_frequency: 0.0 raytrace_range: 5.0 obstacle_range: 5.0 static_map: true rolling_window: false width: 60.0 height: 60.0 resolution: 0.2 origin_x: 0.0 origin_y: 0.0 track_unknown_space: true publish_voxel_map: true unknown_cost_value: 255 transform_tolerance: 0.5 map_type: costmap transform_tolerance: 0.5 obstacle_range: 2.5 max_obstacle_height: 2.0 raytrace_range: 3.0 inscribed_radius: 0.35 circumscribed_radius: 0.4 inflation_radius: 0.6 cost_scaling_factor: 15.0 lethal_cost_threshold: 100 observation_sources: base_scan base_scan: {sensor_frame: /base_laser_link, data_type: LaserScan, expected_update_rate: 0.0, observation_persistance: 0.0, marking: true, clearing: true} #Independent settings for the planner's costmap global_costmap: global_frame: /map robot_base_frame: /base_link update_frequency: 1.0 publish_frequency: 0.5 raytrace_range: 30.0 obstacle_range: 5.0 static_map: false rolling_window: false width: 60.0 height: 60.0 resolution: 0.05 origin_x: -30.0 origin_y: -30.0 #Independent settings for the local planner's costmap local_costmap: global_frame: /odom robot_base_frame: /base_link update_frequency: 1.0 publish_frequency: 5.0 static_map: false rolling_window: true width: 3.0 height: 5.0 resolution: 0.05 origin_x: 0.0 origin_y: 0.0 What is wrong here?

Using SLAM Gmapping on Stage with Fuerte

$
0
0
I am having trouble using Gmapping on Stage along with a very basic controller publishing on *cmd_vel* and reading from *base_scan*. Here is my launch file: However, this doesn't work; I receive the error "transform from base_link to odom failed", then slam starts relying on the odometer so the map is all messed up. I don't understand why this is happening. Stage seems to be publishing the right tf's; the tree is as follows: map -> odom -> base_footprint -> base_link -> base_laser_link. Here is the tf tree created by view_frame: ![image description](/upfiles/13778752333043734.png) Oh, and I just noticed this on Rviz: ![image description](/upfiles/1377875876976647.png) However, I just reset everything and the transforms on Rviz are fine now, but I still get the error and mapping problem. Is there a fix for this transform problem? Could it be a synchronization issue even if I set use_sim_time to true? I've been struggling with this all day, and I don't understand what the problem could be...

Stageros: cannot change z coordinate of base_link → base_laser tf

$
0
0
Hello all, for any reason I cannot put the laser of my robot at its real height in the Stage-simulated version. The maximum z I get is 0.15 m! No idea why. I have tried to resize the robot model, to place the laser higher than real position, and more, but nothing helps. Is not a critical issue but annoying, as it force me to keep two different versions of costmap sensors configuration (simulated and real). Here is my robot model (a turtlebot): define kinect ranger ( sensor ( range_max 6.5 fov 58.0 samples 640 ) # generic model properties color "black" size [ 0.06 0.15 0.03 ] ) define turtlebot position ( pose [ 0.0 0.0 0.0 0.0 ] odom_error [0.03 0.03 999999 999999 999999 0.02] size [ 0.33 0.33 0.40 ] origin [ 0.0 0.0 0.0 0.0 ] gui_nose 1 drive "diff" color "gray" kinect(pose [ -0.1 0.0 0.3 0.0 ]) ) And the base_link → base_laser tf: - Translation: [-0.100, 0.000, 0.150] - Rotation: in Quaternion [0.000, 0.000, 0.000, 1.000] in RPY [0.000, -0.000, 0.000] Thanks!

How to get robot position (x,y) in a map?

$
0
0
Hi, I want to **calculate robot's current position** with respect to the **map**. Autonomous navigation of ROS works **fine**. Initially, I thought that by listening to **/amcl_pose topic**, we can get the current position. But when I do, **"rostopic echo /amcl_pose"**, then there is no such messages. I am using **Pioneer 3 AT**, and want to calculate the robot's (center of gravity) position with respect to a known map. (**don't want** to consider **four corners of the robot**). Following is my **"rosrun tf view_frames"** [tf.jpg](/upfiles/13988714412451395.jpg) In the [answer](http://answers.ros.org/question/130541/tracking-robot-position-during-teleoperation/), I get that AMCL usually **publishes the position of the robot as a TF transform from the /map frame to the /base_link frame?** But, How to achieve this **can you help me with some simple code snippet?** Thanks in advance.........

Could not find a connection between '/map' and '/base_link'

$
0
0
Hi, I want to **calculate robot's current position with respect to the map**. Autonomous navigation of ROS works **fine**. Following is my **"rosrun tf view_frames"** [tf tree](http://answers.ros.org/upfiles/13988714412451395.jpg) I have **tried following two commands which gives robot position?? And it works correctly** rosrun tf tf_echo /map /base_link rosrun tf tf_echo /odom /base_footprint Code snippet used the **listen the transform** is given below::::::I have used this code **inside a nodelet's init()** method..Code ***compiled successfully***. transform and listener are made public class members. while (nh.ok()) { //tf::StampedTransform transform; try { //ROS_INFO("Attempting to read pose..."); listener.lookupTransform("/map","/base_link",ros::Time(0), transform); //listener.lookupTransform("/odom","/base_footprint",ros::Time(0), transform); //SECOND STATEMENT// ROS_INFO("Got a transform! x = %f, y = %f",transform.getOrigin().x(),transform.getOrigin().y()); } catch (tf::TransformException ex) { ROS_ERROR("Nope! %s", ex.what()); } //rate.sleep(); } **ERROR [lookupTransform.jpg](/upfiles/13990283806989855.jpg)** Even if I try "**SECOND STATEMENT"(see code snippet)**, we get following error. [ERROR] [1399027108.366171508]: Nope! Could not find a connection between '/odom' and '/base_footprint' because they are not part of the same tree.Tf has two or more unconnected trees. [ERROR] [1399027108.366232448]: Nope! Could not find a connection between '/odom' and '/base_footprint' because they are not part of the same tree.Tf has two or more unconnected trees. Thank you for any kind of help................... **rxconsole OUTPUT [transform.jpg](/upfiles/13991314003247882.jpg) and "rosrun tf tf_echo /map /base_link" output** [map to base_link.jpg](/upfiles/1399131441608574.jpg)

rosrun tf tf_echo /map /base_link VS. Coding implementation.

$
0
0
Hi, I want to calculate robot's current position with respect to the map. **Following is my "rosrun tf view_frames"** [tf tree](http://answers.ros.org/upfiles/13988714412451395.jpg) I have tried following commands which gives robot position with respect to /map frame. **rosrun tf tf_echo /map /base_link** ***Output*** is here:[map to base_link.jpg](/upfiles/1399291760642935.jpg) **Now same thing, I tried to perform using the code** [here](http://pastebin.com/Z5pVWaTn) But the output of rxconsole is shown below:: [transform.jpg](/upfiles/13992918927182973.jpg). **I am just wondering why the results of the code and that of "rosrun tf tf_echo /map /base_link" is not matching?** I **am getting "Got a transform! x = 0.000000, y =0.000000",** even after 1sec when I use the code. **But "rosrun tf tf_echo /map /base_link", gives actual robot position** with respect to the map as you can see the **screen shot**. **Question1:** Is there any way to get the exact position of the robot while moving in the environment? **Question 2**: I don’t know how the above command gives position of the robot with respect to the map, but the implementation of the SAME COMMAND gives some INVALID result? **Question 3:** Is there any way to **emulate the command "rosrun tf tf_echo /map /base_link" in coding**? Please help.......... Many Thanks.

Laser -> point cloud, tf drop all packages

$
0
0
hi, all, I am super new to ROS. I am trying to use tf to transform the laser input to tf base_link frame. But I am constantly getting error msg like "MessageFilter [target=base_link ]: Dropped 100.00% of messages so far. Please turn the [ros.agv.message_notifier] rosconsole logger to DEBUG for more information." and it seems the call back was never invoked. I tested the laser msg by subscribing to the raw msg and it works fine. I think there might be a broken link somewhere in the settings. Can someone help me? here's the code for the listener. class LaserScanToPointCloud{ public: ros::NodeHandle node; laser_geometry::LaserProjection projector; tf::TransformListener listener; message_filters::Subscriber laser_sub; tf::MessageFilter laser_notifier; ros::Publisher scan_pub; LaserScanToPointCloud(ros::NodeHandle n) : node(n), laser_sub(node, "base_scan", 10), laser_notifier(laser_sub,listener, "base_link", 10) { printf("setting up callback\r\n"); laser_notifier.registerCallback(boost::bind(&LaserScanToPointCloud::scanCallback, this, _1)); laser_notifier.setTolerance(ros::Duration(0.01)); scan_pub = node.advertise("my_cloud",1); printf("set up callback\r\n"); } void scanCallback (const sensor_msgs::LaserScan::ConstPtr& scan_in) { sensor_msgs::PointCloud localcloud; printf("%ds:%lfm\r\n",scan_in->header.stamp.sec,scan_in->ranges[128]); try { projector.transformLaserScanToPointCloud("base_link",*scan_in, localcloud,listener); } catch (tf::TransformException& e) { std::cout << e.what(); return; } printf("(%f,%f,%f)\r\n",localcloud.points.data()->x,localcloud.points.data()->y,localcloud.points.data()->z); // Do something with cloud. scan_pub.publish(localcloud); } }; int main(int argc, char** argv) { ros::init(argc, argv, "my_scan_to_cloud"); ros::NodeHandle n; LaserScanToPointCloud lstopc(n); ros::spin(); return 0; } and here's the broadcaster int main(int argc, char** argv){ ros::init(argc, argv, "robot_tf_publisher"); ros::NodeHandle n; ros::Rate r(50); 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", "base_scan")); r.sleep(); } return 0; } million thanks Ray

set up a TF broadcaster for laser input

$
0
0
hi, All, I am trying to compose a broadcaster node to take in raw laser readings and converted to robot base frame. is there any tutorial/example I can refer to? input sensor_msgs::LaserScan laser_in; broadcast tf::Stamped laser_pose; Thanks Ray

How to publish transform from odom to base_link?

$
0
0
I have a Recorded rosbag file which contains Laserscan data (LMS100) linked to base_link. I trying to use amcl and localize the robot in the map, but amcl needs odom->baselink so that it can publish map->odom. But currently there is no link between odom and base_link. I loaded the map in rviz, when set the **global options** to *base_link -> I am getting scan data* ; when set to *odom -> I getting odometry data* in rviz; when set *map-> nothing* is happening. I want to integrate in the way map->odom->base_link. I could not able to figure out the way to link the odom -> base_link. Can anyone help me to solve above problem.

/tf from /base_link to /camera_link

$
0
0
Hi, I'm using ccny_rgbd_tools which gives me a transform between /camera_link, which is the base_frame, and /odom, which is the fixed_frame. I'm using MoveIt!, where I have a urdf model which as a camera_link and a base_link, which supposedly already gives a static_tf between them. I have a virtual_joint between camera_link and odom (which is floating, cause it is from a quadrotor). Now running demo.launch (without the static_transform_publisher between camera_link and odom) I get this on the command line: [ WARN] [1404846265.951041568]: No transform available between frame 'odom' and planning frame '/base_link' (Could not find a connection between 'base_link' and 'odom' because they are not part of the same tree.Tf has two or more unconnected trees.) I have a /tf between odom and camera_link, and a /tf from base_link to camera_link, which builds up a tree. Why does it needs a /tf between base_link and odom? Thanks in advance!

which frame I should use ?

$
0
0
I used laser_geometry tutorial and I have this code: LaserScanToPointCloud(ros::NodeHandle n): n_(n), // laser_sub_(n_, "base_scan", 10), laser_sub_(n_, "/laserscan", 1), laser_notifier_(laser_sub_,listener_, "laser0_frame", 1) { std::cout << "Object created" << std::endl ; laser_notifier_.registerCallback( boost::bind(&LaserScanToPointCloud::scanCallback, this, _1)); laser_notifier_.setTolerance(ros::Duration(0.01));// 0.01 std::cout << "before pub " << std::endl ; scan_pub_ = n_.advertise("cloud",1); std::cout << "after pub " << std::endl ; } ========================================== sensor_msgs::PointCloud cloud; try { std::cout << "try " << std::endl ; projector_.transformLaserScanToPointCloud( "laser0_frame",*scan_in, cloud,listener_); } catch (tf::TransformException& e) { std::cout << "catch 1 " << std::endl ; std::cout << e.what(); std::cout << "catch " << std::endl ; return; } I changed base_scan to laser_scan --> this is because the topic name that publishes laser data is called laser_scan is that right ?? should I do that or shouldn't I ? Also, I did rostopic echo /scan and I found that the frame id is laser0_frame.. So I used it instead of the base_link. The base_link was used in the geometry tutorial. now in the previous code should I use base_link or laser0_frame

[Groovy] How to link /scan to base_link?

$
0
0
When I launch my move_base.launch, ( http://wiki.ros.org/navigation/Tutorials/RobotSetup) , I got this error : Waiting on transform from /base_link to /map to become available before running costmap, tf error: [ WARN] [1406541885.908819812]: No laser scan received (and thus no pose updates have been published) for 1406541885.908702 seconds. Verify that data is being published on the /scan topic. This is my frames.pdf file ![image description](/upfiles/14065417171134717.png) This is the rqt_graph : ![image description](/upfiles/14065449943086318.png)

laser_frame not moving

$
0
0
I have the following scheme in simulation enviroment with Gazebo and Rviz: laser_frame -> base_link -> base_stabilized -> base_footprint -> odom -> map -> world laser_frame to base_link is provided by robot_state_publisher looking up in the urdf file base_link -> base_stabilized -> base_footprint -> odom is provided by a 'message_to_tf' node that takes ground_truth topic with z axis and rotation to publish this transformations odom -> map is provided by a mapper node setting up the transforms in x-axis and y-axis map -> world is provided by a node doing a static/fixed transform In Rviz we have as fixed frame and target frame the /world frame. World is fixed, map is fixed refering to world, odom is moving in x,y,z and rotation refering to map BUT base_footprint, base_link and therefore laser_frame arent moving. They keep as they started. How can I fix it? What am I missing? Thanks

[Hydro] Error in move_base.launch rviz

$
0
0
I succed finally to launch my move_base.launch file. And when with rviz I tried to tell where the robot is in the map, with the 2d Pose Estime, i got this message : Failed to transform initial pose in time (Lookup would require extrapolation into the future. Requested time 1407222627.317546291 but the latest data is at time 1407222627.301636934, when looking up transform from frame [map] to frame [base_link]) I think that there is a link with my previous problem http://answers.ros.org/question/187967/groovy-how-to-link-scan-to-base_link/ This is my view_frames ![image description](/upfiles/14072235806418181.png) My local costmap is : local_costmap: global_frame: /odom robot_base_frame: base_link update_frequency: 5.0 publish_frequency: 2.0 static_map: false rolling_window: true width: 6.0 height: 6.0 resolution: 0.05 My global costmap is global_costmap: global_frame: /map robot_base_frame: base_link update_frequency: 5.0 static_map: true The link beetween map and /odom is done in the move_base.launch file : When I launched roswtf i got this error Loaded plugin tf.tfwtf No package or stack in context ================================================================================ Static checks summary: No errors or warnings ================================================================================ Beginning tests of your ROS graph. These may take awhile... analyzing graph... ... done analyzing graph running graph rules... ... done running graph rules running tf checks, this will take a second... ... tf checks complete Online checks summary: Found 3 warning(s). Warnings are things that may be just fine, but are sometimes at fault WARNING The following node subscriptions are unconnected: * /amcl: * /tf_static * /clock * /initialpose * /scan * /robot_state_publisher: * /joint_states * /rpid_velocity: * /rwheel * /diff_tf: * /lwheel * /rwheel * /map_server: * /clock * /odom_map_broadcaster: * /clock * /move_base: * /move_base_simple/goal * /tf_static * /clock * /lpid_velocity: * /lwheel WARNING These nodes have died: * mark2_arduino-2 WARNING Received out-of-date/future transforms: * receiving transform from [/robot_state_publisher] that differed from ROS time by 1407396264.96s * receiving transform from [/diff_tf] that differed from ROS time by 1407396264.45s Found 1 error(s). ***Update The new tf view_frames*** ![image description](/upfiles/14085280359790738.png)

static_transform_publisher base_link base_laser

$
0
0
hi everyone Is this line enough in order to use tf package for set a fixed relation between base_link and base_laser frames in my launch file? and do i need other nodes or scripts to set /map frames or others especially when we want to use packages like gmapping or amcl?? thanks:))))

Where do I put base_footprint?

$
0
0
So I have a urdf for my robot, with the tree root as `base_link`. However, I am using `robot_pose_ekf`, which has a hard-coded transform for `base_footprint`. Assuming a simple square `base_footprint`, should I make it the root: base_footprint base_link ... rest of model EDIT: After adding a base_footprint link and joint to base_link: robot name is: Thumperbot_Simplistic ---------- Successfully Parsed XML --------------- root Link: base_footprint has 1 child(ren) child(1): base_link I still get the following error: Node: /robot_pose_ekf Time: 12:35:35.441279569 (2014-09-16) Severity: Debug Published Topics: /robot_pose_ekf/odom_combined, /rosout, /tf Could not transform imu message from base_link to base_footprint. Imu will not be activated yet. Location: /tmp/buildd/ros-indigo-robot-pose-ekf-1.11.11-0trusty-20140805-0105/src/odom_estimation_node.cpp:OdomEstimationNode::imuCallback:234 ---------------------------------------------------------------------------------------------------- Perhaps it is not receiving my urdf that have in the launchfile? Here is the launchfile: odom_used: false imu_used: true vo_used: true debug: true self_dignose: true Here razor_imu and piksi_driver are drivers for the razor imu sensor and the piksi gps sensor. Both sensors output their data correctly.

changing the dimention of the base link moved the robot upward from the ground

$
0
0
I have a mobile robot "husky" I have the following things in a urdf file: In the same urdf file I have this information related to the base link: 10 I changed in the stl file the dimension of the base_link there fore I have to change in the urdf file the following The problem is that the mobile robot now is flying by 1 meter above the ground. how can I change the dimension of the base_link and keep the mobile robot in the ground

more than one odom->base_link transform

$
0
0
Hello, I am using rtabmap rgbd_odometry node and data from IMU feeded to robot_pose_ekf node. This gives me stable odometry. This stable odometry data publishes a odom->base_link transform. Apart from this the rgbd_odometry node and robot_pose_ekf node also publishes the transform between odom and baselink. To avoid any conflict i remapped the frame id of rgbd_odometry and robot_pose_ekf as odom1 and odom_combined. But now when i run rosrun tf view_frames The results are varying everytime i run the command. Sometimes it shows that odom-base_link transform is published by odom and at other point of time it shows that the same transform is published by rgbd_odometry. How can i select odom to be publishing this transform always ? roswtf gives me this. ERROR TF re-parenting contention: * reparenting of [base_link] to [odom_combined] by [/robot_pose_ekf] * reparenting of [base_link] to [odom_useless] by [/rgbd_odometry] * reparenting of [base_link] to [odom] by [/odom] ERROR TF multiple authority contention: * node [/robot_pose_ekf] publishing transform [base_link] with parent [odom_combined] already published by node [/odom] * node [/rgbd_odometry] publishing transform [base_link] with parent [odom_useless] already published by node [/robot_pose_ekf] * node [/odom] publishing transform [base_link] with parent [odom] already published by node [/rgbd_odometry] * node [/rgbd_odometry] publishing transform [base_link] with parent [odom_useless] already published by node [/odom] * node [/odom] publishing transform [base_link] with parent [odom] already published by node [/robot_pose_ekf] * node [/robot_pose_ekf] publishing transform [base_link] with parent [odom_combined] already published by node [/rgbd_odometry] Please help me with this. I have been stuck at the same point since last 4 days.

RViz - RobotModel -> base_link -> 'show trail' history

$
0
0
I'm trying to display the trail of my robot in RViz. I know that it's possible by publishing a visualization_msgs/Marker something like in this tutorial: [Markers: Points and Lines (C++)](http://wiki.ros.org/rviz/Tutorials/Markers%3A%20Points%20and%20Lines). However, at first I'd like to know if it's possible to do it easier way using display type RobotModel -> Links -> base_link -> show trail. Yes, it draws a path of my robot but only a small part of it - after a few seconds of driving the beginning is 'erased'. Is it possible to make the history/lifetime (not sure how to exactly call it) of my trail longer?
Viewing all 74 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>