0
$\begingroup$

Rosanswers logo

Hi,

I am having tf issues with scan tool as in in this link -> http://wiki.ros.org/laser_ortho_projector

Under the package summary, it states that the tf transformation of world → base_ortho is already a provided transformation. Does this mean I still need to manually create a static transform between the world frame and base_ortho frame in my launch file? Because if I don't, rviz warns me that the base_ortho frame does not exist. So I am pretty confused what I actually need to do because at the moment the projected point cloud does not match the laser scans from my rplidar sensor.

I am hoping I will be able to obtain something like this -> https://www.youtube.com/watch?v=jHsdwQbqc8Y

Currently when I do a top down view on RVIZ, the raw laser scans do not coincide with the point cloud representation.

Please help me out. My project is due really soon :(

Thanks in advance!

My launch file:

 <launch>
<param name="/use_sim_time" value="false"/>
 <node pkg="laser_ortho_projector" type="laser_ortho_projector_node" name="laser_ortho_projector" 
    output="screen">
    <param name="use_imu" type="bool" value="false"/>
    <param name="publish_tf" type="bool" value="true"/>
  </node>

  <node pkg="tf" type="static_transform_publisher" name="world_to_map" 
    args="0 0 0 0 0 0 /world /map 100" />
  
  <node pkg="tf" type="static_transform_publisher" name="map_to_base" 
    args="0 0 0 0 0 0 /map /base_link 100" /> 

  <node pkg="tf" type="static_transform_publisher" name="base_to_laser" 
    args="0 0 0.5 3.14159 -0.57189 0 /base_link /laser 100" /> 
   
</launch>

image description


Originally posted by Rayner on ROS Answers with karma: 62 on 2017-02-12

Post score: 0


Original comments

Comment by gvdhoorn on 2017-02-12:
Looking at the page you linked, I see:

~publish_tf (bool, default: false)

whether to publish the tf between the fixed_frame and the base_ortho frames as a tf.

Have you changed that value to true? Otherwise I would not expect laser_ortho_projector to publish the TF frame.

Comment by Rayner on 2017-02-12:
Yes, I changed the value to true from the start. I edited the demo.launch file provided. I have included the launch file above. Do I need to create a base_ortho frame before the laser_ortho_projector is able to generate the tf transformation?

Comment by gvdhoorn on 2017-02-12:\

Yes, I changed the value to true from the start.

Please always include all relevant information in your posting. We cannot guess what you have and have not already done.

Please include a screenshot of rqt_tf_tree after you've roslaunched your current launch file.

Comment by Rayner on 2017-02-12:
Sorry, I was referring to your question regarding setting the publish_tf to true. I have included the screenshot of the rqt_tf_tree above.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As far as I read the code, having use_imu set to false (and implicitly, leaving use_pose as true (here), leads to the node subcribing to a geometry_msgs/Pose topic (here).

Looking at where publish_tf_ is checked, we find it in the sensor_msgs/Imu callback (here) and in the geometry_msgs/Pose callback (here).

Nowhere else is the world → base_ortho frame published.

I'm guessing you don't have a publisher that publishes geometry_msgs/Pose on a pose topic, and since you have use_imu set to false, I'm assuming you don't have an imu either.

That would explain why you don't see the frame: it's not published.


As to why that pose subscriber, and the corresponding use_pose parameter are not documented, I don't know. Would be nice if you could update the wiki page to include those.


Originally posted by gvdhoorn with karma: 86574 on 2017-02-12

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Rayner on 2017-02-12:
Oh I see. How do I go about publishing the geometry_msgs/Pose on a pose topic?

Comment by gvdhoorn on 2017-02-12:
I think the node is expecting a 6dof pose reference (relative to some global frame). Perhaps you could use some sensor fusion node for that.

But I just read the code. I have no experience with this particular node, so I could be wrong.

Comment by gvdhoorn on 2017-02-12:
If you have an imu that could also work (but you'd have to update your launch file parameters).

Comment by Rayner on 2017-02-18:
The problem is I don't have an imu so im depending solely on geometry_msgs/pose. Is there a way to publish a pose since I am planning to fix my sensor at a 30deg angle. I thought the code automatically changes the static transform into a pose_msg? (here)

Comment by Rayner on 2017-02-18:
I did some debugging and realized the execution of the code totally skipped the Pose callback and went straight to scan callback, where it just ran continuously in a loop. Is there a way to make it go through the pose callback?

Comment by gvdhoorn on 2017-02-19:\

Is there a way to make it go through the pose callback?

Yes. By publishing a Pose to the pose topic.

Tha's what I wrote earlier: apparently the node works either with IMU msgs or a geometry_msgs/Pose published by some other node.

Comment by gvdhoorn on 2017-02-19:\

went straight to scan callback, where it just ran continuously in a loop

not continuously: it'll iterate over all ranges in the current scan.

Comment by Rayner on 2017-02-19:
I have a turtlebot with a kobuki base. Do you think there are any turtlebot nodes that can help me publish the pose msg? Sorry I am still in the process of learning ROS, thank you so much for your patience.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.