is the input value of Frame KDL::Segment::pose (const double & q ) const a deg or a rad value?
The Orocos ProjectSmarter control in robotics & automation! |
|
KDL::Segment::pose
is the input value of Frame KDL::Segment::pose (const double & q ) const a deg or a rad value? |
KDL::Segment::pose
On Monday 15 September 2008 15:33:33 manuelbirlo [..] ... wrote:
> is the input value of Frame KDL::Segment::pose (const double & q ) const
> a deg or a rad value?
it depends on the type of joint in the root of the segment. For translational
joints this is meter, for rotational joints it is radians.
Ruben
KDL::Segment::pose
are the frames which you get from this function expressed in world coordinates or in relative coordinates?
example:
If I want to get the current z-axis of joint 2 for joint angle 0:
KDL::Segment seg = chain.getSegment(1);
KDL::Frame f;
f = segment.pose(0.0);
KDL::Vector z_axis;
z_axis(0) = f(0,2);
z_axis(1) = f(1,2);
z_axis(2) = f(2,2);
does f now contains the current z-axis with respect to the base frame or with respect to the previous frame?
KDL::Segment::pose
On Monday 06 October 2008 12:09:20 manuelbirlo [..] ... wrote:
> are the frames which you get from this function expressed in world
> coordinates or in relative coordinates?
They are in the base-frame of the segment, since a segment has no idea were it
is positioned in the world frame
> example:
> If I want to get the current z-axis of joint 2 for joint angle 0:
>
> KDL::Segment seg = chain.getSegment(1);
> KDL::Frame f;
> f = segment.pose(0.0);
> KDL::Vector z_axis;
You could have written: KDL::Vector z_axis=f.M.UnitZ(), which is a much nicer
way of accessing the underlying axes of the rotation of a frame.
see
> z_axis(0) = f(0,2);
> z_axis(1) = f(1,2);
> z_axis(2) = f(2,2);
>
> does f now contains the current z-axis with respect to the base frame or
> with respect to the previous frame?
it is the z-axis of the tip of the segment with respect to the base of the
segment.
Ruben