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

quaternion problem

asked 2014-09-08 18:12:03 -0500

AlexKolb gravatar image

updated 2014-09-09 18:46:40 -0500

Hey guys,

I'm detecting cylindrical objects in a point cloud and want to use a service to save all the data of the cylinders and make them accessible to other nodes. What i'm having trouble with is that i want to visualize the cylinders in rviz and therefor i need the center point and the quaternion, but the segmentation function of pcl gives me two vectors, bottom point and a direction vector. I already managed to compensate the offset from the bottom point to center point by simple vector calculations and to get the quaternion from the two vectors but i need the bottom point and don't want to save all of this information.

Is there a way to save just the bottom point and the quaternion and "slide" the bottom point along the quaternion up for half the cylinder hight, whenever i want to visualize it in rviz? Or do you think that the data size wouldn't be problematic if i have to save up to 1000 cylinder datasets containing two 3Dvectors and quaternion?

cheers

Alex

Edit: To sum it up: Is it possible to calculate the center point with just the bottom point and the quaternion?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-09 00:23:15 -0500

tfoote gravatar image

updated 2014-09-09 19:13:45 -0500

If you have one point and the quaternion, that's about as compact a data representation as you can get for free space position. The second vector is redundant with the quaternion, you don't need to keep both.

On modern computers storing thousands of poses is not particularly large enough to worry about most of the time.

Edit:

If the cylinder is of known size, yes the lowest point and orientation is enough to compute any position on the cylinder. Otherwise no.

edit flag offensive delete link more

Comments

thanks, but whats the math behind it? How can i calculate the center point for the cylinder with the bottom point and the quaternion?

AlexKolb gravatar image AlexKolb  ( 2014-09-09 00:46:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-08 18:12:03 -0500

Seen: 189 times

Last updated: Sep 09 '14