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

setting up a tf for SICK Laser Scanner PLS101-312

$
0
0
Hi, I am currently working with a 2d laser scanner (PLS101-312). There are no registered drivers available for this device in the ROS repositories. however, following this [answer](http://answers.ros.org/question/61600/sick-scanner-pls200-113/), I was able to find a fork on git [here](https://github.com/hawesie/laser_drivers/tree/master/sicktoolbox_pls_wrapper), which works pretty fine on the device I am working on. I could also see the stream of laser data using `$ rostopic echo /scan` My question here is, How can I view the laser scan data on rviz? When tried the /scan topic on rviz, I get an error saying that the frame for laser_scanner cannot be /world, the [example here](http://wiki.ros.org/sicktoolbox_wrapper/Tutorials/UsingTheSicklms) shows that it is being set to a base_laser. how can I do the same? I am aware that, there should be a tf for my laser_scanner, what would be the simplest way of setting up a tf for the laser, just for testing the laser scanner output? please suggest, some Ideas. Thanks again, Murali

Transform Quaternion

$
0
0
Hi! Is there a package witch transforms the quaternion coordinates automatically in an other system? (Axis-Angle, Kardan, Euler) Thanks.

point transform from rotation and translation in python

$
0
0
hi all. the python tf api has a function for transforming stamped points but i can't find anything to transform a point with just a rotation and translation... there is a function for returning a matrix from the translation and rotation... is this the only way of transforming such a point? cheers, Garrick.

Waiting on transform from /base_footprint to /map to become available before running costmap, tf error:

$
0
0
I want to auto navigate my P3AT. Using ROS-Fuertr (on PC1: UBUNTU 12.04 LTS) & USARSim (on PC2: windows7 ). I have my launch file move_base.launch, but when i try, $ roslaunch my_robot_name_2dnav move_base.launch i am getting an warning message, [ WARN] [1413488778.937642524]: Waiting on transform from /base_footprint to /map to become available before running costmap, tf error: [see here the full terminal output](https://www.dropbox.com/s/qgpkuoh65m3mepg/automated-issue.docx?dl=0) please help to improve this scenario.

No transform from [/GroundTruth] to frame [/map]

$
0
0
hello, i want to navigate P3AT (in USARSim @windows PC1) from ROS (Fuerte @UBUNTU PC2). i am using ros navigation stack for auto navigation. but facing an issue with rviz, 1. **No transform from "[/base_GroundTruth]" to frame "[/map]"** , [click here to seen the problem snapshot](https://www.dropbox.com/s/iabl1p5vo5fu9hy/tf_rviz_error.png?dl=0) 2. **No transform from "[/GroundTruth]" to frame "[/map]"** **question:** how to get ride of this status warning.

Recording tf to rosbag and playing back at reduced speed

$
0
0
This worked in Hydro but appears to be broken in Indigo perhaps. I'm recording a robot experiment using rosbag record /tf /tf_static /camera/depth_registered/points /robot/joint_states -O trial1.bag Then I play it back with rosbag play --clock -r 0.1 trial1.bag But in MoveIt! I get the tf error: WARN ros.moveit_ros_planning: Unable to transform object from frame 'camera_depth_optical_frame' to planning frame '/base' (Lookup would require extrapolation into the past. Requested time 1414097890.120901958 but the earliest data is at time 1414097890.730995187, when looking up transform from frame [camera_depth_optical_frame] to frame [base]) **But the error goes away** if I use a ``-r 1`` instead of ``-r 0.1`` - meaning if I run it in regular time it works fine. I tried setting rosparam set use_sim_time true But that doesn't seem to do anything. Also, I converted the tf tree to pdf and everything looks correct. So I have some kind of timing error....

PR2 transform error from external desktop (unable to look up transform)

$
0
0
I have been trying to get pr2_surrogate working on our PR2. Everything works, except the arms don't move. We are using the razer hydra to move the arms and the occulus rift to move the head. If I look at the pr2-dashboard I see: "Failed to transform: Unable to lookup transform, cache is empty, when looking up transform from frame [/hydra_left_pivot] to frame [/torso_lift_link]" If I look at the tf tree from the desktop, I see the frame /hydra_left_pivot as a child to to frame /torso_lift_link. However, the most_recent_transform seems to be an uninitialized value (i.e. 1414105165.131). If I look at the tf tree from the robot, I see normal values. I'm wondering if this is caused by a connection issue? The desktop can publish commands to the robot, and the entire surrogate setup works, except for the arm movement. We've set ROS_IP and ROS_MASTER_URI correctly.

How to send tf data from multiple namespaces to Rviz?

$
0
0
My setup: I have setup a launch file with two groups defining the namespaces for two robots, and launching rviz together with a joint_state_publisher, robot_state_publisher, ned_static_transform_publisher and a robot_description parameter. The goal is to simulate multiple robots, each in its own namespace and visualize in Rviz. Each robot sends tf transforms with sendTransform() from tf.TransformBroadcaster(), but they become the same /tf when seen in rqt_graph, and in rviz it means that my robot model is updating to the two robots seperatepositions, and not having a seperate model for each. I have tried to used the tf_prefix, but that does not do any thing. I am using Indigo. I have found that it might be because that method is not valid since Hydro. See [1]. I have searched quite a bit around via google and directly on the answers.ros.org, but only found older posts saying to use tf prefixes as , and also a lot saying that it does not work any more. But I have not found a solution. I have thought about writing another node that takes the poes from the two robots and let this send the transforms. I hope someone has another and more elegant solution that the one I just proposed. Any pointers or help is appreciated. [1] http://answers.ros.org/question/12877/tf-on-multiple-robots-gets-crowded/?answer=19017#post-id-19017

TF not compiling under Groovy?

$
0
0
I am trying to implement some TF under groovy, but ran into compilation errors quickly. I just installed a fresh Ubuntu 12.04 with ROS Groovy. To be sure, I tried to implement the tutorial (http://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf) to see if the error also replicates there when compiled, and it does: Built target /home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp: In function ‘void poseCallback(const PoseConstPtr&)’: /home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp:14:44: warning: ‘tf::Quaternion::Quaternion(const tfScalar&, const tfScalar&, const tfScalar&)’ is deprecated (declared at /opt/ros/groovy/include/tf/LinearMath/Quaternion.h:51) [-Wdeprecated-declarations] /home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp:14:46: error: no matching function for call to ‘tf::Quaternion::setRPY(tf::Quaternion)’ /home/ruud/Dropbox/ros/catkin_workspace/src/learning_tf/src/turtle_tf_broadcaster.cpp:14:46: note: candidate is: /opt/ros/groovy/include/tf/LinearMath/Quaternion.h:94:8: note: void tf::Quaternion::setRPY(const tfScalar&, const tfScalar&, const tfScalar&) /opt/ros/groovy/include/tf/LinearMath/Quaternion.h:94:8: note: candidate expects 3 arguments, 1 provided make[2]: *** [learning_tf/CMakeFiles/turtle_tf_broadcaster.dir/src/turtle_tf_broadcaster.cpp.o] Error 1 make[1]: *** [learning_tf/CMakeFiles/turtle_tf_broadcaster.dir/all] Error 2 make: *** [all] Error 2 Anyone had this issue before? Thanks! Ruud EDIT SOLVED: In the tutorial it says (see below) that you have to change line 14 of the code. I did that but then I get the error. If I switch back to the original code, then it compiles fine! *"Looks like Quaternion API has changed (sorry but not sure when it occurred...Here it's assumed at some point between electric and fuerte) so that the order of the arguments needs changed (Relevant QA thread). That said, if you're on a version prior to the API change, you need to change line 14 to: q.setRPY( tf::Quaternion(msg->theta, 0, 0) );"* Please also take a look here if you have this error: http://answers.ros.org/question/45884/turtle-tf-tutorial-fails-to-work/?answer=47845#post-id-47845

How to rotate vector by quaternion in python

$
0
0
What is the python tf API to rotate a vector by a quaternion to get another vector?

Get RPY from tfListener

$
0
0
Hi, I want to get the RPY data from my transformation. I have the next code: include include include include int main(int argc, char **argv) { ros::init(argc, argv, "tf_listener"); ros::NodeHandle nh; ROS_INFO_STREAM("Started node tf_listener."); std::string target_frame, source_frame; tf::TransformListener tf_listener; tf::StampedTransform transform; ros::Rate rate(1.); if (argc < 3) { return -1; } else { target_frame = argv[1]; source_frame = argv[2]; } while (ros::ok()) { try { tf_listener.lookupTransform(target_frame, source_frame, ros::Time(), transform); geometry_msgs::Transform buffer; tf::transformTFToMsg(transform, buffer); ROS_INFO_STREAM("Transform from " << target_frame << " to " << source_frame << ": " << std::endl << buffer); ROS_INFO_STREAM("Distance between transforms: " << transform.getOrigin().length() << " meters."); } catch (...) { ROS_WARN_STREAM("Waiting for transform from " << target_frame << " to " << source_frame); } rate.sleep(); } return 0; } How can I get it?? Thanks.

tf max_cache_time

$
0
0
Hi, The tf transform listener object constructor takes a value for the max_cache_time; say 10 seconds for instance.. > tf::TransformListener> tf(ros::Duration(10)); What is the use of this cache? And what are the pros and cons of increasing or decreasing the number? Does this imply that if I add a value of 5, I am expecting to use 5 second old tf data somewhere? And does this have any effect on the duration for the waitForTransform function? Thank you.

Frame id / does not exist!

$
0
0
Hey, I am getting an error when transforming a pointcloud, after a couple of hours, I am still not sure why.. Below is the code I used. I hardcoded the frame's names and the times to transform them to as present time. transform_listener.waitForTransform("/base", "/right_hand", ros::Time::now(), ros::Duration(3.0)); transform_listener.transformPointCloud ("/base", ros::Time::now(), input_pointcloud, "/right_hand", transformed_pointcloud); The transform_listener is created as a private variable inside a class object, of which one instance is created in the main function of my program. The ros::init function is called first in the main function, thereafter the class instance is created. I read about scoping issues with the TF [here](http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29) which tells me: > We create a TransformListener object. Once the listener is created, it starts receiving tf transformations over the wire, and buffers them for up to 10 seconds. The TransformListener object should be scoped to persist otherwise it's cache will be unable to fill and almost every query will fail. A common method is to make the TransformListener object a member variable of a class. However, as far as I know my `tf::TransformListener` is in scope? And this is the error during runtime. [ WARN] [1415383382.159412441]: Could not transform received slam pointcloud from '/right_hand' to '/base' frame : Frame id / does not exist! Frames (101): Also see : [Image with all the frames and relations](http://imgur.com/pMqG2Vp)

Why tf is not linked on indigo?

$
0
0
Hi! I've the problem that on ROS indigo **tf** is not linked to my executable even if I specify it in find_package and as dependency in package.xml. Below is a stripped down example that shows the problem. On ROS Hydro the package compiles fine. On ROS Indigo i get the linker error: **undefined reference to `tf::TransformBroadcaster::TransformBroadcaster()'** This are the only files in the package: tf_broadcaster.cpp: #include #include int main(int argc, char** argv){ tf::TransformBroadcaster br; return 0; }; CMakeLists.cpp: cmake_minimum_required(VERSION 2.8.3) project(tmptest) find_package(catkin REQUIRED COMPONENTS roscpp tf ) add_executable(tf_broadcaster src/tf_broadcaster.cpp) target_link_libraries(tf_broadcaster ${catkin_LIBRARIES}) Package.xml: tmptest0.0.0The tmptest packagemeTODOcatkinroscpptfroscpptf If I take a closer look at ${catkin_LIBRARIES}, libtf.so is not contained on Indigo, but it is on Hydro. Is this a bug or am I missing something that has changed from Hydro to Indigo. Thx!

tf linker error

$
0
0
Hi all, I have a linker issue while using tf library. Here is my callback. Without this only line in the callback there is NO linker error. Please, find below the linker error itself. void callback (const sensor_msgs::PointCloud2ConstPtr& input) { listener->waitForTransform("/world_base_link", (*input).header.frame_id, (*input).header.stamp, ros::Duration(5.0)); ... } int main (int argc, char** argv) { ros::init(argc, argv, "subscriber"); ros::NodeHandle n; ros::Subscriber sub = n.subscribe("/kinect2/depth/points", 1, callback); ros::spin (); } Linker error: Linking CXX executable range_image_border_extraction CMakeFiles/range_image_border_extraction.dir/range_image_border_extraction.cpp.o: In function `callback(boost::shared_ptr> const> const&)': range_image_border_extraction.cpp:(.text+0x18c): undefined reference to `tf::Transformer::waitForTransform(std::basic_string, std::allocator> const&, std::basic_string, std::allocator> const&, ros::Time const&, ros::Duration const&, ros::Duration const&, std::basic_string, std::allocator>*) const' collect2: ld returned 1 exit status make[2]: *** [range_image_border_extraction] Error 1 make[1]: *** [CMakeFiles/range_image_border_extraction.dir/all] Error 2 make: *** [all] Error 2 CMakeLists.txt cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(range_image_border_extraction) find_package(PCL 1.7 REQUIRED) find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg tf pcl_ros) include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) add_executable(range_image_border_extraction range_image_border_extraction.cpp) target_link_libraries(range_image_border_extraction ${PCL_LIBRARIES}) target_link_libraries(range_image_border_extraction ${catkin_LIBRARIES}) Any ideas how to resolve this linker error?

tf tree empty on PR2

$
0
0
Hi all, We have a PR2 and when starting it up (claim and start) under any account, the tf tree rostopic echo /tf No frames show up, only --- transforms: [] tf_static is empty, rosrun tf view_frames or rosrun tf2_tools view_frames.py Do not show any frames. TF is running however, and I can publish new transforms, which will be shown, e.g. rosrun tf static_transform_publisher 1 0 0 0 0 0 1 link1_parent link1 100 Normally (before and also in simulation) multiple frames should be advertised when starting the PR2. Any hint in what went wrong? Does it have to do with tf2? And where to start looking? system: - PR2 - Ubuntu 12.04.2 LTS - ROS Groovy - tf related installations: - i A ros-groovy-roswtf - roswtf is a tool for diagnosing issues wit - i A ros-groovy-rqt-tf-tree - rqt_tf_tree provides a GUI plugin for visu - i A ros-groovy-tf - tf is a package that lets the user keep tr - i A ros-groovy-tf-conversions - This package contains a set of conversion - i A ros-groovy-tf2 - tf2 is the second generation of the transf - i A ros-groovy-tf2-geometry-msgs - tf2_geometry_msgs - i A ros-groovy-tf2-kdl - KDL binding for tf2 - i A ros-groovy-tf2-msgs - tf2_msgs - i A ros-groovy-tf2-ros - This package contains the ROS bindings for - i A ros-groovy-tf2-tools - tf2_tools

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.

Question about tf | problem with ar_pose reverse

$
0
0
Hi, I successfully run [ar_pose](http://wiki.ros.org/ar_pose) with tracking a single marker option. I also tried to run option: tracking the camera position (reverse), everything looks good, but I don't get image... My topics exists but rviz says something different. Please check this screen: http://snag.gy/OhN45.jpg rostopic seems to be ok: przemek@przem:~/tum_simulator_ws/src/ar_tools/ar_pose/launch$ rostopic list /ar_pose_marker /camera/camera_info /camera/image_color /camera/image_color/compressed /camera/image_color/compressed/parameter_descriptions /camera/image_color/compressed/parameter_updates /camera/image_color/compressedDepth /camera/image_color/compressedDepth/parameter_descriptions /camera/image_color/compressedDepth/parameter_updates /camera/image_color/theora /camera/image_color/theora/parameter_descriptions /camera/image_color/theora/parameter_updates /camera/image_mono /camera/image_mono/compressed /camera/image_mono/compressed/parameter_descriptions /camera/image_mono/compressed/parameter_updates /camera/image_mono/compressedDepth /camera/image_mono/compressedDepth/parameter_descriptions /camera/image_mono/compressedDepth/parameter_updates /camera/image_mono/theora /camera/image_mono/theora/parameter_descriptions /camera/image_mono/theora/parameter_updates /camera/image_proc_debayer/parameter_descriptions /camera/image_proc_debayer/parameter_updates /camera/image_proc_rectify_color/parameter_descriptions /camera/image_proc_rectify_color/parameter_updates /camera/image_proc_rectify_mono/parameter_descriptions /camera/image_proc_rectify_mono/parameter_updates /camera/image_raw /camera/image_raw/compressed /camera/image_raw/compressed/parameter_descriptions /camera/image_raw/compressed/parameter_updates /camera/image_raw/compressedDepth /camera/image_raw/compressedDepth/parameter_descriptions /camera/image_raw/compressedDepth/parameter_updates /camera/image_raw/theora /camera/image_raw/theora/parameter_descriptions /camera/image_raw/theora/parameter_updates /camera/image_rect /camera/image_rect/compressed /camera/image_rect/compressed/parameter_descriptions /camera/image_rect/compressed/parameter_updates /camera/image_rect/compressedDepth /camera/image_rect/compressedDepth/parameter_descriptions /camera/image_rect/compressedDepth/parameter_updates /camera/image_rect/theora /camera/image_rect/theora/parameter_descriptions /camera/image_rect/theora/parameter_updates /camera/image_rect_color /camera/image_rect_color/compressed /camera/image_rect_color/compressed/parameter_descriptions /camera/image_rect_color/compressed/parameter_updates /camera/image_rect_color/compressedDepth /camera/image_rect_color/compressedDepth/parameter_descriptions /camera/image_rect_color/compressedDepth/parameter_updates /camera/image_rect_color/theora /camera/image_rect_color/theora/parameter_descriptions /camera/image_rect_color/theora/parameter_updates /clicked_point /initialpose /move_base_simple/goal /rosout /rosout_agg /tf /tf_static /visualization_marker /visualization_marker_array I get launch file from [this repository](https://github.com/xqms/ar_tools/blob/catkin/ar_pose/launch/ar_pose_reverse.launch) my launch looks: Where did I make a mistake? please help.

[turtle_pointer-6] process has died when running tf tutorial

$
0
0
I tried to follow the tutorial from here : http://www.ros.org/wiki/tf/Tutorials/Introduction%20to%20tf But there's some error and a process died. This is the full message : ----------------------------------------------------------------------------------- roslaunch turtle_tf turtle_tf_demo.launch ... logging to /home/albert/.ros/log/52b0e6d8-1099-11e2-aceb-5404a6dc3a5e/roslaunch-Albert-PC-11357.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://Albert-PC:50707/ SUMMARY ======== PARAMETERS * /rosdistro * /rosversion * /scale_angular * /scale_linear * /turtle1_tf_broadcaster/turtle * /turtle2_tf_broadcaster/turtle NODES / sim (turtlesim/turtlesim_node) teleop (turtlesim/turtle_teleop_key) turtle1_tf_broadcaster (turtle_tf/turtle_tf_broadcaster.py) turtle2_tf_broadcaster (turtle_tf/turtle_tf_broadcaster.py) turtle_pointer (turtle_tf/turtle_tf_listener.py) auto-starting new master Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored process[master]: started with pid [11373] ROS_MASTER_URI=http://localhost:11311 setting /run_id to 52b0e6d8-1099-11e2-aceb-5404a6dc3a5e Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored process[rosout-1]: started with pid [11386] started core service [/rosout] Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored process[sim-2]: started with pid [11398] Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored process[teleop-3]: started with pid [11415] Reading from keyboard --------------------------- Use arrow keys to move the turtle. Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored process[turtle1_tf_broadcaster-4]: started with pid [11446] Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored process[turtle2_tf_broadcaster-5]: started with pid [11447] Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored process[turtle_pointer-6]: started with pid [11448] Traceback (most recent call last): File "/opt/ros/fuerte/stacks/geometry_tutorials/turtle_tf/nodes/turtle_tf_listener.py", line 57, in (trans,rot) = listener.lookupTransform('/turtle2', '/turtle1', rospy.Time()) tf.ExtrapolationException: Lookup would require extrapolation at time 1349626149.653091908, but only time 1349626149.653103113 is in the buffer, when looking up transform from frame [/turtle1] to frame [/turtle2] [WARN] [WallTime: 1349626149.680432] Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details. [turtle_pointer-6] process has died [pid 11448, exit code 1, cmd /opt/ros/fuerte/stacks/geometry_tutorials/turtle_tf/nodes/turtle_tf_listener.py __name:=turtle_pointer __log:=/home/albert/.ros/log/52b0e6d8-1099-11e2-aceb-5404a6dc3a5e/turtle_pointer-6.log]. log file: /home/albert/.ros/log/52b0e6d8-1099-11e2-aceb-5404a6dc3a5e/turtle_pointer-6*.log ------------------------------------------------------------------------------- How to solve this problem? Thanks~

attach a polygon to show tf in rviz

$
0
0
hi everyone I want to show a footprint of my robot in rviz. I have my tf like /laser, /base_link, /odom and /map in rviz and i can see them and track my robot movement. But i want to attach a polygon to my tf. Should i use a urdf or it is really more simpler than this???? thanks:)))
Viewing all 844 articles
Browse latest View live


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