Trajectory Generator - Path_RoundedComposite

Dear All,

I forward my question from Orocos Forum on Mon, 2012-06-11 15:47 (apparently,
no email on digest have been sent...)

Dear All,
>
> I am trying to create a simple component for trajectory generator purpose,
> using Path_RoundedComposite. I am following the example
> trajectory_example.cpp for that, but I keep catching the following
> exception:
>
> 3.562 [ ERROR ][Logger] Circle : Plane for motion is not properly defined
>
> What is the exact meaning of this? And why is not properly defined? ( =
> what am I doing wrong?) (To be sure, I used the same values/viaponts used
> in the example, same velocity profile parameterization and so on....)
>
> I report below part of the code interested...
>
> _path.reset(new KDL::Path_RoundedComposite(0.2,0.01,new KDL::RotationalInterpolation_SingleAxis()));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(M_PI,0,0), KDL::Vector(-1,0,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(M_PI/2,0,0), KDL::Vector(-0.5,0,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0,0,0), KDL::Vector(0,0,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0.7,0.7,0.7), KDL::Vector(1,1,1)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0,0.7,0), KDL::Vector(1.5,0.3,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0.7,0.7,0), KDL::Vector(1,1,0)));
> _path->Finish();
>
> _vel_profile.reset(new KDL::VelocityProfile_Trap(0.5,0.1));
> _vel_profile->SetProfile(0,_path->PathLength());
> _traj.reset(new KDL::Trajectory_Segment(_path.get(),_vel_profile.get()));
>
> _max_duration = KDL::max(10, _traj->Duration());
> _time_passed = 0;
> _time_begin = os::TimeService::Instance()->getTicks();
> }
> catch(KDL::Error& e)
> {
> log(Error) << e.Description() << endlog();
> return false;
> }
>
> Thank You in advance! - Enea Scioni
>

Trajectory Generator - Path_RoundedComposite

On 06/18/2012 01:07 PM, Enea Scioni wrote:
> Dear All,
>
> I forward my question from Orocos Forum on Mon, 2012-06-11 15:47
> (apparently, no email on digest have been sent...)
>
> Dear All,
>
> I am trying to create a simple component for trajectory generator
> purpose, using Path_RoundedComposite. I am following the example
> trajectory_example.cpp for that, but I keep catching the following
> exception:
>
> 3.562 [ ERROR ][Logger] Circle : Plane for motion is not properly
> defined
>
> What is the exact meaning of this? And why is not properly
> defined? ( = what am I doing wrong?) (To be sure, I used the same
> values/viaponts used in the example, same velocity profile
> parameterization and so on....)
>
> I report below part of the code interested...
>
> _path.reset(new KDL::Path_RoundedComposite(0.2,0.01,new KDL::RotationalInterpolation_SingleAxis()));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(M_PI,0,0), KDL::Vector(-1,0,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(M_PI/2,0,0), KDL::Vector(-0.5,0,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0,0,0), KDL::Vector(0,0,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0.7,0.7,0.7), KDL::Vector(1,1,1)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0,0.7,0), KDL::Vector(1.5,0.3,0)));
> _path->Add(KDL::Frame(KDL::Rotation::RPY(0.7,0.7,0), KDL::Vector(1,1,0)));
> _path->Finish();
>
> _vel_profile.reset(new KDL::VelocityProfile_Trap(0.5,0.1));
> _vel_profile->SetProfile(0,_path->PathLength());
> _traj.reset(new KDL::Trajectory_Segment(_path.get(),_vel_profile.get()));
>
> _max_duration = KDL::max(10, _traj->Duration());
> _time_passed = 0;
> _time_begin = os::TimeService::Instance()->getTicks();
> }
> catch(KDL::Error& e)
> {
> log(Error)<< e.Description()<< endlog();
> return false;
> }
>
> Thank You in advance! - Enea Scioni
>
This error is caused by the fact that your have 3 points on a line. The
routine then tried to fit an arc between, but was unable
to determine the plane in which to construct the arc ( since there are
infinitely many planes through three colinear points).

The code was recently improved to handle this case ( by leaving out the
arc when the points are colinear).

For this, however, you'll need the latest version in the repository:
http://git.mech.kuleuven.be/robotics/orocos_kinematics_dynamics.git
for anonymous access.

It is strongly advised to use the latest version when you are using the
trajectory* and path* classes.

Examples are now provided in the examples directory.

You can consult the log or the orocos bugzilla for the recent changes.
>
>