ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ERROR: Laser has to be mounted planar

asked 2015-03-30 11:20:15 -0600

saraalsiari gravatar image

updated 2015-04-03 05:13:53 -0600

Hi,

I'm using Ubuntu 14.04 and ROS indigo.

I published the TF using static_transform_publisher from tf package.

Using the following tag to publish the transformation between the base_link and the camera_link:

<node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="0 0 1 0 0 0 1 base_link camera_link 100" />

When I started slam_gmapping node it gives the following error:

Laser has to be mounted planar! Z-coordinate has to be 1 or -1, but gave: 0.00000

The problem is solved when I changed the Y coordinate to 1 or -1 . But this is not the right transformation of my robot.

UPDATE:

This is my transformation tree

and this is the launch file I used:

 <launch>
    <node pkg="tf" type="static_transform_publisher" name="base_to_camera_broadcaster" args="0 0 1 0 0 0 1 base_link camera_link 100" />    
    <include file="$(find pointcloud_to_laserscan)/launch/pointcloud_to_laserscan.launch"/>
    <node pkg="roboteq_motor" type="odom" name="odom"/>
  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <rosparam>
      odom_frame: odom
      map_update_interval: 1.0
      maxUrange: 30.0
      maxRange: 60.0
      sigma: 0.05
      kernelSize: 1
      lstep: 0.05
      astep: 0.05
      iterations: 5
      lsigma: 0.075
      ogain: 3.0
      lskip: 0
      linearUpdate: 0.5
      angularUpdate: 0.436
      temporalUpdate: -1.0
      resampleThreshold: 0.5
      particles: 80
      xmin: -1.0
      ymin: -1.0
      xmax: 1.0
      ymax: 1.0
      delta: 0.025
      llsamplerange: 0.01
      llsamplestep: 0.01
      lasamplerange: 0.005
      lasamplestep: 0.005
      base_frame: base_link
    </rosparam>
</node>
</launch>

Note: I didn't publish The odom to base_link transformation using static_transform_publisher because the node odom publishes this information using sendTransform. Is that ok? or they are different things?

edit retag flag offensive close merge delete

Comments

Have you also tried args="0 0 1 0 0 0 base_link camera_link 100"? (Alternative format for static_transform_publisher.)

slivingston gravatar image slivingston  ( 2015-03-30 16:47:52 -0600 )edit

It doesn't look like gmapping is plotting your map in the base_link frame and therefore there is probably another transformation in the chain - take care to see that the sensor frame and the map frame (and not sensor frame and base link frame) are planar wrt to each other.

2ROS0 gravatar image 2ROS0  ( 2015-03-31 00:10:26 -0600 )edit

@slivingston Thank you but didn't work

saraalsiari gravatar image saraalsiari  ( 2015-04-02 03:47:46 -0600 )edit

@2ROS0 How can I make sure that the sensor frame and the map frame are planar? It might me a basic thing but I'm a beginner. Also, I updated the question with an image of my transformation tree, please take a look at it.

saraalsiari gravatar image saraalsiari  ( 2015-04-02 03:52:45 -0600 )edit

Can you update the launch file you're using to start the gmapping node? @saraalsiari

2ROS0 gravatar image 2ROS0  ( 2015-04-02 21:26:47 -0600 )edit

@2ROS0 Yes I updated it and the same problem occurs. Please see the new update in the question.

saraalsiari gravatar image saraalsiari  ( 2015-04-03 05:05:16 -0600 )edit

@saraalsiari, I got the same problem, did you solve it by any chance?

Kishore Kumar gravatar image Kishore Kumar  ( 2016-01-30 12:55:58 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-10 13:34:10 -0600

skywalker gravatar image

This answer in VREP forum might help you : http://www.forum.coppeliarobotics.com...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-03-30 11:20:15 -0600

Seen: 1,886 times

Last updated: Aug 10 '15