Ask Your Question
0

Laser_Ortho_Projector Transformation

asked 2017-02-12 08:23:16 -0500

Rayner gravatar image

updated 2017-02-12 09:33:31 -0500

Hi,

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

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=jHsdw...

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

edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar imagegvdhoorn ( 2017-02-12 08:38:12 -0500 )edit

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?

Rayner gravatar imageRayner ( 2017-02-12 08:44:53 -0500 )edit

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.

gvdhoorn gravatar imagegvdhoorn ( 2017-02-12 09:21:07 -0500 )edit

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.

Rayner gravatar imageRayner ( 2017-02-12 09:33:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-12 09:56:44 -0500

gvdhoorn gravatar image

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.

edit flag offensive delete link more

Comments

Oh I see. How do I go about publishing the geometry_msgs/Pose on a pose topic?

Rayner gravatar imageRayner ( 2017-02-12 10:39:06 -0500 )edit

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.

gvdhoorn gravatar imagegvdhoorn ( 2017-02-12 10:56:17 -0500 )edit

If you have an imu that could also work (but you'd have to update your launch file parameters).

gvdhoorn gravatar imagegvdhoorn ( 2017-02-12 10:56:57 -0500 )edit

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)

Rayner gravatar imageRayner ( 2017-02-18 01:20:13 -0500 )edit

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?

Rayner gravatar imageRayner ( 2017-02-18 13:19:34 -0500 )edit

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.

gvdhoorn gravatar imagegvdhoorn ( 2017-02-19 05:06:15 -0500 )edit

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.

gvdhoorn gravatar imagegvdhoorn ( 2017-02-19 05:07:40 -0500 )edit

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.

Rayner gravatar imageRayner ( 2017-02-19 11:09:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-02-12 08:23:16 -0500

Seen: 872 times

Last updated: Feb 12 '17