Hello,
I am using V-REP to simulate a vehicle with a Velodyne. To simulate the behavior of the real Velodyne, I transform at each simulation pass the captured points to the /odom frame. This is to gather 360º data and correct the delay between samples due to the car velocity (this is what I asked in [this question](http://answers.ros.org/question/239849/how-is-tf-data-handled-by-velodyne_driver/)).
Now, other members of my team, need the point cloud to be given relative to the velodyne frame (base_laser), so I just need to transform the point cloud relative to /odom to the desired target frame. My tf tree is /odom->/base_link->/base_laser and is working fine. I use Ubuntu 14.04 and ROS Indigo.
The best solution I found was using the pcl_ros package and I tried doing
sensor_msgs::PointCloud2 buffer_local;
tf::TransformListener listener;
pcl_ros::transformPointCloud("/base_laser",_buffer, buffer_local, listener);
_pubVelodyne.publish(buffer_local);
being **_buffer** the previous pointcloud relative to /odom.
I am getting the following error:
> [ERROR] [1475751606.660104363]: "base_laser" passed to lookupTransform argument target_frame does not exist.
It looks like transformPointCloud calls the lookupTransform function but is unable to find the "base_laser" frame. My tf tree is correct (I've checked it with rosrun tf view_frames) and if instead of transforming it to "base_laser" I transform it to "/odom" (itself), I get the original pointcloud without errors, as expected.
Where can be the error? Is the use of the TransformListener right? My pointcloud uses the timestamp of ROS, so it should be right. Another option would be using the transformPointCloud funtion with the transform directly retrieved from tf by me.
Any ideas?
**UPDATE 1:**
I was using the TransformListener just after creating it, that's why I got that error. Now I create a listener as a class member and I get another error:
> [ERROR] [1475759993.562920093]: Lookup would require extrapolation into the future. Requested time 1475759993.562353881 but the latest data is at time 1475759993.468326569, when looking up transform from frame [odom] to frame [base_laser]
I understand I get this error because transformPointCloud wants to use a later transform, so I should use waitForTransform before calling transformPointCloud, right?
So, if I want to use the latest transform available, I would have to manually retrieve it using
listener.lookupTransform("/odom", "/base_laser", ros::Time(0), transform);
and then use
transformPointCloud(original_PC, transformed_PC, transform_matrix)
(after converting the StampedTransform to a Transform object).
**UPDATE 2:**
Simply use this [pcl_ros::transformPointCloud](http://docs.ros.org/kinetic/api/pcl_ros/html/namespacepcl__ros.html#a34090d5c8739e1a31749ccf0fd807f91) definition.
**UPDATE 3:**
The previous only works for PointCloud data. For PointCloud2 the available definitions of pcl_ros::transformPointCloud are [these](http://docs.ros.org/indigo/api/pcl_ros/html/namespacepcl__ros.html#a29cf585a248dc53517834f4c5a1c4d69).
In order to get the latest available transform, it must be done as suggested in my first Update of this question.
Regards
↧
Proper way to transform a point cloud
↧
Z-coordinate has to be 1 or -1
Hello,
I'm starting to build a map using gmapping, but whenever I start slam_gmapping, the following warning is shown:
Laser has to be mounted planar! Z-coordinate has to be 1 or -1, but gave: 0.00000
This is one of the published transformations:
When I change the X argument into 1 or -1 the warning is gone! I don't know why!.But I'm sure there is something wrong!! and I need the X to be 0.
any idea?
UPDATE:
These are the frames in rviz:

and I cannot change the values of the orientation in rviz.
↧
↧
How to show robot tipping over in Rviz
I've created a URDF model of my robot, linked it to Tf and configured Rviz to show my robot and show joint rotations in realtime when the actual robot moves.
My robot also has an IMU that can measure the yaw, pitch and roll. If I tip over my robot, I want this to be reflected in Rviz. How do you accomplish this? The joints are automatically updated based on the URDF and associated JointState messages, but there's no joint between the robot and the ground. How do I make Rviz tilt the model proportional the angles shown in my IMU messages and/or moving around as the IMU and odometry change?
↧
Using tf data of geomagic touch to control schunk lwa3
Hi,
I am trying to control schunk lwa 3 in gazebo using joint angles of geomagic touch. I can control lwa3 using commands from the terminal but to teleoperate I need to somehow map tf data of geomagic touch to lwa3. I dont know how to go about it. Is it possible to control lwa using omni keeping in mind difference in their configuration. I would be thankful if anyone could point out the steps to go about it.
↧
Rtabmap transform error with kinect
So I want to use rtabmap in order to map my environment.
I am using Freenect to extract the data from the kinect using `roslaunch freenect_launch freenect-registered-xyzrgb.launch`
Then i want to run `roslaunch rtabmap_ros kinectlaser.launch` where kinectlaser consists of the following link : [kinectlaser.launch](http://wiki.ros.org/rtabmap_ros/Tutorials/SetupOnYourRobot#Kinect_.2B-_Odometry_.2B-_Fake_2D_laser_from_Kinect)
Unfortunately I am encountering an TF error which says
> [ WARN] [1477558055.097346892]: rtabmap: Could not get transform from base_link to camera_rgb_optical_frame after 0.200000 seconds (for stamp=1477558054.541588)!>[ERROR] [1477558055.097900220]: TF of received depth image 0 at time 1477558054.541588s is not set, aborting rtabmap update.>[ WARN] [1477558056.855120061]: rtabmap: Could not get transform from base_link to camera_rgb_optical_frame after 0.200000 seconds (for stamp=1477558056.609746)!>[ERROR] [1477558056.855669588]: TF of received depth image 0 at time 1477558056.609746s is not set, aborting rtabmap update.
Also when looking into my tf_view I can only see odom, base_footprint, base_link and specific topics for my roomba.
↧
↧
[URG+hector_slam]Error on rviz
Hello, I am Tanaka Japanese.
I have something I want to ask you.
Using URG + hector_slam, I want to make Map. But there are two error on rviz.
https://github.com/DaikiMaekawa/hector_slam_example.
↑ I am using "hector_hokuyo_launch" in this site.
----error 1 on rviz----
In LaserScan Status::Error,
Transform:「For frame [laser]:Fixed Frame [map] does not exit」
----error 2 on rviz----
In Global Status,
Fixed Frame::「No tf data.Actual error:Fixed Frame [map] does not exist」
----Usage environment----
OS: ubuntu14.04
Version: indigo
LRF: UTM-30X
----Log is as follows----
~/catkin_ws/src/hector-slam-example/launch$ roslaunch hector_hokuyo.launch
... logging to /home/tanaka/.ros/log/d507a8d6-96f2-11e6-89b5-fcf8ae0bcc05/roslaunch-tanaka-Endeavor-NJ5900E-11009.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://127.0.0.1:49774/
SUMMARY
========
PARAMETERS
* /base_frame: base_frame
* /hector_geotiff_node/draw_background_checkerboard: True
* /hector_geotiff_node/draw_free_space_grid: True
* /hector_geotiff_node/geotiff_save_period: 0.0
* /hector_geotiff_node/map_file_base_name: hector_slam_map
* /hector_geotiff_node/map_file_path: /opt/ros/indigo/s...
* /hector_geotiff_node/plugins: hector_geotiff_pl...
* /hector_mapping/advertise_map_service: True
* /hector_mapping/base_frame: base_footprint
* /hector_mapping/laser_z_max_value: 1.0
* /hector_mapping/laser_z_min_value: -1.0
* /hector_mapping/map_frame: map
* /hector_mapping/map_multi_res_levels: 2
* /hector_mapping/map_resolution: 0.05
* /hector_mapping/map_size: 2048
* /hector_mapping/map_start_x: 0.5
* /hector_mapping/map_start_y: 0.5
* /hector_mapping/map_update_angle_thresh: 0.06
* /hector_mapping/map_update_distance_thresh: 0.4
* /hector_mapping/odom_frame: nav
* /hector_mapping/pub_map_odom_transform: True
* /hector_mapping/scan_subscriber_queue_size: 5
* /hector_mapping/scan_topic: scan
* /hector_mapping/tf_map_scanmatch_transform_frame_name: scanmatcher_frame
* /hector_mapping/update_factor_free: 0.4
* /hector_mapping/update_factor_occupied: 0.9
* /hector_mapping/use_tf_pose_start_estimate: False
* /hector_mapping/use_tf_scan_transformation: True
* /hector_trajectory_server/source_frame_name: /base_link
* /hector_trajectory_server/target_frame_name: /map
* /hector_trajectory_server/trajectory_publish_rate: 0.25
* /hector_trajectory_server/trajectory_update_rate: 4.0
* /map_frame: map
* /odom_frame: odom
* /pub_map_odom_transform: True
* /rosdistro: indigo
* /rosversion: 1.11.20
NODES
/
base_2_nav_link (tf/static_transform_publisher)
base_footprint_2_base_link (tf/static_transform_publisher)
base_frame_2_laser_link (tf/static_transform_publisher)
base_link_2_base_stabilized_link (tf/static_transform_publisher)
base_stablized_2_base_frame (tf/static_transform_publisher)
hector_geotiff_node (hector_geotiff/geotiff_node)
hector_mapping (hector_mapping/hector_mapping)
hector_trajectory_server (hector_trajectory_server/hector_trajectory_server)
hokuyo_node (hokuyo_node/hokuyo_node)
map_2_odom (tf/static_transform_publisher)
odom_2_base_footprint (tf/static_transform_publisher)
rviz (rviz/rviz)
ROS_MASTER_URI=http://127.0.0.1:11311
core service [/rosout] found
process[hokuyo_node-1]: started with pid [11027]
process[map_2_odom-2]: started with pid [11028]
process[odom_2_base_footprint-3]: started with pid [11029]
process[base_footprint_2_base_link-4]: started with pid [11041]
process[base_link_2_base_stabilized_link-5]: started with pid [11051]
process[base_stablized_2_base_frame-6]: started with pid [11058]
process[base_frame_2_laser_link-7]: started with pid [11073]
process[base_2_nav_link-8]: started with pid [11087]
process[rviz-9]: started with pid [11100]
process[hector_mapping-10]: started with pid [11113]
process[hector_trajectory_server-11]: started with pid [11135]
process[hector_geotiff_node-12]: started with pid [11142]
[ INFO] [1477551836.679370193]: Waiting for tf transform data between frames /map and /base_link to become available
HectorSM map lvl 0: cellLength: 0.05 res x:2048 res y: 2048
HectorSM map lvl 1: cellLength: 0.1 res x:1024 res y: 1024
[ INFO] [1477551836.738564037]: HectorSM p_base_frame_: base_footprint
[ INFO] [1477551836.738638293]: HectorSM p_map_frame_: map
[ INFO] [1477551836.738663259]: HectorSM p_odom_frame_: nav
[ INFO] [1477551836.738688734]: HectorSM p_scan_topic_: scan
[ INFO] [1477551836.738715540]: HectorSM p_use_tf_scan_transformation_: true
[ INFO] [1477551836.738743303]: HectorSM p_pub_map_odom_transform_: true
[ INFO] [1477551836.738780060]: HectorSM p_scan_subscriber_queue_size_: 5
[ INFO] [1477551836.738808260]: HectorSM p_map_pub_period_: 2.000000
[ INFO] [1477551836.738833718]: HectorSM p_update_factor_free_: 0.400000
[ INFO] [1477551836.738858272]: HectorSM p_update_factor_occupied_: 0.900000
[ INFO] [1477551836.738882714]: HectorSM p_map_update_distance_threshold_: 0.400000
[ INFO] [1477551836.738907848]: HectorSM p_map_update_angle_threshold_: 0.060000
[ INFO] [1477551836.738932192]: HectorSM p_laser_z_min_value_: -1.000000
[ INFO] [1477551836.738956542]: HectorSM p_laser_z_max_value_: 1.000000
[ INFO] [1477551836.756671736]: Successfully initialized hector_geotiff MapWriter plugin TrajectoryMapWriter.
[ INFO] [1477551836.756946445]: Geotiff node started
Please advise me.
I would appreciate it if you would give me some advice.



↧
Gmapping and tf
Hi all
My robot in rviz has some problems when i run gmapping launch file. the robot model and it's wheel got to take apart. How can i fix it. Sorry for my bad english. Thanks first.
Here is the image

My launch file
↧
Query in turtlesim tf tutorials.
I am currently going through the tf [tutorials](http://wiki.ros.org/tf/Tutorials) and have a doubt in particular in the tf [listener](http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29).
In the code
while(n.ok())
{
tf::StampedTransform tf;
try{
listen.lookupTransform("/turtle2","/turtle1",ros::Time(0),tf);
}
What does turtle1 to turtle2 frame transformation mean? The turtle1 frame is already transformed to the world frame in the tf [broadcaster](http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20broadcaster%20%28C%2B%2B%29)?
↧
How to run "tf view_frames" for a remapped tf
I remapped `/tf` to `/tf_0`, but I can't get `rosrun tf view_frames` to show me the tree for `/tf_0`. How to do it?
↧
↧
Reducing the publishing rate of a topic from RosLaunch
Hi there,
I have a custom-built robot which I am trying to control with move_it. I have written the urdf and generated the srdf using the move_it setup assistant.
All the topics from my URDF are being broadcast on tf links at 30Hz based on a sensor_msgs/JointState node I wrote. I am trying to link the base of my robot to the vicon `/world` coodinate frame (I am using the [vicon_bridge package](http://wiki.ros.org/vicon_bridge) ). For some reason, I find that the frames being broadcast by vicon are crazily high (to the order of 200 - 400Hz) and as a result, move_it is not updating the tf transforms because of errors such as the following:
```ERROR] [1477965797.682768512]: Transform error: Lookup would require extrapolation into the future. Requested time 1477965797.631547473 but the latest data is at time 1477965797.626859796, when looking up transform from frame [headnball_link] to frame [world]
```
My `tf` `view_frames` is given by the attachment in the link http://tinypic.com/r/23uwtmo/9 . Is there a way to specify the publish limit to a nodefrom within a roslaunch file?
↧
Messagefilter dropped 100% of messages
When launching the navigation stack (gmapping and movebase) I will frequently receive the following message:
[ WARN] [1477990695.164889638]: MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.costmap_2d.message_notifier] rosconsole logger to DEBUG for more information.
[ WARN] [1477990695.175311684]: MessageFilter [target=map ]: Dropped 100.00% of messages so far. Please turn the [ros.costmap_2d.message_notifier] rosconsole logger to DEBUG for more information.
When looking at my tf tree i see the following information.

I will update this post with rosconsole logger to debug information soon.
The following message is given:
[DEBUG] [1299740216.768663556, 1299651571.155978846]: MessageFilter [target=/odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=camera_depth_frame, stamp=1299651570.618031)
[DEBUG] [1299740216.768820286, 1299651571.155978846]: MessageFilter [target=/odom ]: Added message in frame laser at time 1299651571.154, count now 5
↧
delete TransformListener object in python to release computational resource
Hello! Recently I notice that, after I create a TransformListener object in a class in python, e.g.:
self.tf = TransformListener(),
the created tf object gets stuck in the memory, even I try deleting it in the "\_\_del\_\_(self)" method of the class with:
del self.tf
self.tf = None,
it does not work. The TransformListener object is used by a method of this class. The problem is that when I continue to create the object of this class (which is called by another class during operation), the TransformListener objects accumulate and occupy the computational resources. Thus my question is that how I can get rid of it to free the unnecessarily occupied resources? I appreciate any answers and suggestions in advance!
↧
evince frames.pdf, but "no protocol specified"
I follow the introduction to tf tutorial
http://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf
when prompting "evince frames.pdf", it should be frames tree.
But instead, it turns out to be problem:

↧
↧
rospy: how to set a transform to TransformerROS ?
After initializing a node, a declare a TransformerROS.
transformer = tf.TransformerROS(True,rospy.Duration(10.0))
but if I want to perform a transform between two frames (in my case, I use turtlebot and I want to transform between odom and base_link), this does not work :
transformed_point = transformer.transformPoint("odom",point)
with error:
[...]
File "/opt/ros/indigo/lib/python2.7/dist-packages/tf/listener.py", line 71, in asMatrix
translation,rotation = self.lookupTransform(target_frame, hdr.frame_id, hdr.stamp)
[...]
LookupException: "odom" passed to lookupTransform argument target_frame does not exist
*note*: I have the bring up nodes of turtlebot running and rostopic informs me odom is broadcasted at 50Hz. Also odom frame shows up in rviz.
Also, I notice :
transformer.getFrameStrings()
prints []
What am I missing ?
Example from here: http://docs.ros.org/jade/api/tf/html/python/tf_python.html
seems to imply I should set the transform to the transformer first, but according to the error I get, the transformer seems to be searching for the transform itself (" ... self.lookupTransform(target_frame, hdr.frame_id, hdr.stamp) ...")
edit : I tried with an instance of TransformListener rather than TransformROS, for same result
↧
Error related with TF tree
I'm trying to localize a Pioneer P3dx with AMCL.
Whenever i run
rosrun amcl amcl
the node says that no data is being published in /scan.
I've searched for it and people usually say that there need to be a transform from the odom frame to the laser frame (at least it was what I understood).
I've made a statical transform and when i run rqt_tf_tree I got /odom->/base_link->/base_laser. Ain't this the necessary? Because with this configuration i still cannot run AMCL correctly.
Any hints?
↧
tf fixed transforms
Hello ROS users,
I'm slightly confused about how TF handles transforms.
I'm using the `tf::TransformBroadcaster` class in a node called `tf_broadcaster_node` for publishing transforms to TF, resulting in the following TF tree:

These frames have fixed transforms (only rotations), represented below as RPY(in degrees) :
- `base_link --> camera_frame` : **Rotation (50, 0, -90)**
- `camera_frame --> bundler_camera_frame` : **Rotation is (0, 180, 0)**
I also have a `tf_listener_node` which is used to query and print these transforms from TF. My expectation was that the fixed-value transforms will be printed exactly as defined above. However, I was surprised to note that they were different:

**Question : Why do the fixed transform values differ from their definitions?**
I'd appreciate any assistance in helping me understand TF better. Thanks!
↧
tf API: Axes/order of rotation
Hello ROS users!
I'm working with **tf** and I've a few questions about the API.
I am defining frames such that Yaw is applied around Z, followed by Pitch around the new Y and then Roll around new X.
Consider a transform from `base_link --> camera_frame`. Assuming I only have constant rotation between the frames (zero translation), here's how I create the transform:
//Fixed transform values
double roll, pitch, yaw;
yaw = DEGREES_TO_RADIANS(90); // 90 degrees around Z
pitch = DEGREES_TO_RADIANS(0); // 0 degrees around new Y
roll = DEGREES_TO_RADIANS(-90); // -90 degrees around new X
//Create Quaternion from Euler angles
tf::Quaternion quat;
quat.setRPY(roll, pitch, yaw);
//quat.setEuler(pitch, roll, -yaw); //
//Set rotations
geometry_msgs::TransformStamped bLink_to_cam;
bLink_to_cam.transform.rotation.x = quat.x();
bLink_to_cam.transform.rotation.y = quat.y();
bLink_to_cam.transform.rotation.z = quat.z();
bLink_to_cam.transform.rotation.w = quat.w();
//Set translations
bLink_to_cam.transform.translation.x = 0;
bLink_to_cam.transform.translation.y = 0;
bLink_to_cam.transform.translation.z = 0;
In another node, I have a `tf::TransformListener` object which receives this transform. Here I print out the values :
void printEulerAngles(tf::StampedTransform& transform){
double roll, pitch, yaw;
tf::Matrix3x3 m(transform.getRotation());
m.getRPY(roll, pitch, yaw);
//m.getEulerZYX(yaw, pitch, roll);
ROS_INFO("\nRoll : %.3f\n"
"Pitch : %.3f\n"
"Yaw : %.3f\n",
RADIANS_TO_DEGREES(roll), RADIANS_TO_DEGREES(pitch), RADIANS_TO_DEGREES(yaw) );
}
I expected to see the transform as defined above. However, I see Roll, Pitch, Yaw (90,90, 0). I did some research and found that `setRPY()` and `getRPY()` follow this convention:
- (roll around X, pitch around Y and yaw around z) around **fixed axes**.
Here are my questions:
1) How do I define rotations when I need to rotate (w.r.t to base_link axes) in the following convention?
- (yaw around **Z**, then pitch around **new Y**, then roll around **new X**)
2) Once I get the above rotation from tf, how do I modify the `printEulerAngles()` method to display them in the same convention as above?
I'd really appreciate any assistance in understanding **tf**. Thanks!
↧
↧
TF Listener for static transforms exclusively
Is there a way to listen to only the *static* transforms in a TF tree (e.g. `base_link --> base_laser_link`) without instantiating an entire `tf::TransformListener` object, which *"receives and buffers all coordinate frames that are broadcasted in the system"* ? Can `tf::MessageFilter`s be used for something like that?
↧
follow a person using openni_tracker
Hi guys, I have openni_tracker working and I would try to make my pioneer follow the detected user.
My idea was to use the tf data give by openni_tracker but I don't how to use them to make the robot moving.
Do you guys have any idea?
Thanks
↧
How to get more readings on TF?
Dear all,
I am seeing that TF tree is so common in robotics. I am having trouble making sense of what it does and how does it work that I can not seem to apply to my projects. I have searched through internet as well as [ros tf](http://wiki.ros.org/tf) but I am not able to fully understand it. Please help or any books on it.
I am using a turtlebot with Kinect sensor and I am trying to understand what is the purpose of transforming one frame to the other? And how are they related?
Thank you
↧