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

Z-coordinate has to be 1 or -1

asked 2015-04-07 14:08:06 -0500

nouf gravatar image

updated 2015-04-08 03:27:02 -0500

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:

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

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:

frames

and I cannot change the values of the orientation in rviz.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-04-07 18:49:57 -0500

updated 2015-04-07 18:50:12 -0500

That error message is a bit confusing. It is just saying that the plane of the laser needs to be parallel to the ground plane. I would check the transform chain you are using (i.e., what is the orientation of base_link) and make sure it has z facing directly up or down. You can do this in rviz using the tf plugin.

if you're curious, the code producing the error message can be found here

edit flag offensive delete link more

Comments

@Morgan Please see the update in the question

nouf gravatar image nouf  ( 2015-04-08 03:27:49 -0500 )edit

I have bumped into the same problem, have you fixed it, can you share how?

Kishore Kumar gravatar image Kishore Kumar  ( 2016-01-21 10:00:56 -0500 )edit
0

answered 2016-10-12 18:28:31 -0500

sradmard gravatar image

I was able to fix the problem by making sure that the frame attached to the base_link has its z-axis pointing upward. You can check it through rviz by visualizing tf and selecting individual frames to visualize.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-04-07 14:08:06 -0500

Seen: 967 times

Last updated: Oct 12 '16