Hi,
I’m writing a guidance::TrajectoryFcamMode mode to follow an april tag.
It seems to work fine like you can see in this video : https://magcloud.magellium.com/owncloud/index.php/s/z6kgK2I4OMhA678 .
Except at one time, trajectory seems to be reset to the beginning.
I display the targeted position and it looks normal.
Here is my generateDroneReference :
void ModeTest::generateDroneReference()
{
guidance::PositionTrajectoryPoint positionTrajectoryPoint;
positionTrajectoryPoint.position = Eigen::Vector3f(droneTargetPose(0,3), droneTargetPose(1,3), droneTargetPose(2,3));
positionTrajectoryPoint.velocity = tagVelocity;
positionTrajectoryPoint.acceleration = tagAcceleration;
setDroneNominalPositionTrajectoryLocal(positionTrajectoryPoint);
}
Any idea ?
Best,
Clément
1 Like
It seems to be fixed when calling guidance::TrajectoryFcamMode::beginStep(); at the beginning of my class’s beginStep().
Don’t know why …
Ronan
June 30, 2022, 7:23am
3
Hi Clement,
Indeed, it is required to call “base” fcam or fstcam trajectory class in each overridden method of the “derived” class.
Thanks.
Hi @Ronan ,
Thank you for this info.
Should we call each fcam base function at the beginning or at the end of each overridden method ? Could you add it in the doc ?
Best,
Clément
Ronan
June 30, 2022, 12:42pm
5
At the beginning of enter(), beginStep(), configure(), generateDroneReference(), endStep() if overridden (but it doesn’t really matter if it’s at the end).
Thanks,
1 Like
system
Closed
July 3, 2022, 12:42pm
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.