Ask Your Question
1

draw pose in rviz: wrong direction

asked 2011-07-19 22:25:51 -0500

minne gravatar image

updated 2011-09-14 05:42:06 -0500

kwc gravatar image

Hi! I want to publish a poseArray to rviz. For understanding I implement a simple pose msg, which I want to send to rviz now with:


geometry_msgs::Pose_< std::allocator<void> > test;
test.position.x = 2;
test.position.y = 2;
test.position.z = 0;
test.orientation = tf::createQuaternionMsgFromYaw(3.14/2);
geometry_msgs::PoseStamped pose;
pose.header.frame_id="/world";
pose.header.stamp = ros::Time::now();
pose.pose = test;
poses_pub->publish(pose);
 

If I set the shape to "axis", the result is fine. But if I set it to "arrow", the arrow points in (-z) direction. In my opinion, it should point in x-y plane (orientation in msg). Setting the quaternion by hand leads to the same result. A message with an "arrow" marker instead of the pose works fine.

I have checked out the newest geometry_msgs and rviz trunk.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-09-13 04:58:25 -0500

hersh gravatar image

You found a bug in rviz! I have created a ticket for it:

https://code.ros.org/trac/ros-pkg/ticket/5165

You first said that you want to publish a PoseArray to rviz, but your code publishes a PoseStamped. If you actually do the PoseArray, it will work, because I fixed the PoseArray display already. (It's fixed in the "Electric" release of rviz.)

For now, if you need the "PoseStamped" version, just use the "Axes" display.

I'll have this fixed and a new release pushed out in the next week or so.

edit flag offensive delete link more
0

answered 2011-07-30 03:29:41 -0500

minne gravatar image

I calculated the quaternion (which was send by message) back to euler angles. The equation 'roll=quaternion' delivered the correct values. Yaw and pitch were zero. Is this an error in ros?

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2011-07-19 22:25:51 -0500

Seen: 1,062 times

Last updated: Sep 13 '11