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

Quaternion has length close to zero... discarding as navigation goal, why?

asked 2012-02-29 10:05:50 -0500

Procópio gravatar image

Hello. I am trying to follow a moving target with my robot through simulation, using stage and rviz. I already managed to send a goal, using actionlib, based on the target position plus an offset. It works most of the time, but I keep getting this error message:

Quaternion has length close to zero... discarding as navigation goal

Why?? What does that mean?

thanks

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2012-02-29 10:29:22 -0500

Eric Perko gravatar image

What are the quaternions you are actually sending? Any quaternion sent should be a properly normalized one (length = 1). The default constructed quaternion geometry_msgs/Quaternion is not a valid quaternion, since it is all 0's.

edit flag offensive delete link more

Comments

thanks. I was actually sending an empty message alternated with a proper one. That is why I could get the robot to move and still get the error messages.

Procópio gravatar image Procópio  ( 2012-03-01 20:00:51 -0500 )edit
2

answered 2012-02-29 10:30:51 -0500

It probably means the rotation quaternion of your goal pose is not properly normalized (e.g. the square root of the sum of squared elements is not 1). Rotation quaternions are generally expected to be normalized, as using non-normalized quaternions would lead to bugs that are hard to detect.

You'll have to check the code generating the target pose for answering the "why?" question.

edit flag offensive delete link more

Comments

thanks for your input!

Procópio gravatar image Procópio  ( 2012-03-01 20:16:52 -0500 )edit

Question Tools

Stats

Asked: 2012-02-29 10:05:50 -0500

Seen: 5,585 times

Last updated: Feb 29 '12