Change maxVelocity of TrajectoryFcamMode

Hi,

I can see max horizontal velocity of TrajectoryFcamMode is 8m/s. I guess the Horizontal Config is SOFT because it correspond to Messages list - 7.7.

Is there a way to increase this velocity, and also max acceletation. In fact, is there a way to put AGGRESSIVE Config to TrajectoryFcamMode ?

Best,
Clément

Hello,

Thanks for your question.

You can do it by getting output, then horizontal trajectory. Finally, you can change config with function set_config of horizontal trajectory.

More precisely, here is a piece of code:

// This function is belong to class Mode 
auto *output = getOutput(); 
// In order that your custom horizontal trajectory will be taken in account
output->mHasHorizontalReference = true; 
// This is function of protobuf to get your local horizontal trajectory
auto horzTraj = output->mHorizontalReference.mutable_trajectory_local(); 
horzTraj->set_config(::ColibryLite::Messages::HorizontalControlConfig::AGGRESSIVE);

For your information, the documentation of

  • Class Mode is here

  • Class Output is here

  • Class HorizontalReference is here

Best regards,
Trang

Hi @trangpham,

I use TrajectoryFcamMode so I don’t call horizontal reference but I call setDroneNominalPositionTrajectoryLocal with the position I want to go in generateDroneReference().

Also, I set the mDroneHorizontalControlConfig = ::ColibryLite::Messages::HorizontalControlConfig::AGGRESSIVE; and the max velocity is 15m/s. Unfortunately, It only works when obstacle avoidance is set to false. But as soon obstacle avoidance is set to true, the max velocity is 8m/s. Is there a limit when obstacle avoidance is set to true ?

Best,
Clément

Hi Clément,

Thank you for your reply.

I understand your problem, because obstacle avoidance is enabled, the attribute sDroneMaxHorizSpeed will not be affected. Instead, you can try to add sReplannerLocal->setMaxHorizontalSpeed(15.0) in your override function beginStep() and see if your drone’s behavior is changed ?

I hope this can solve your problem.

Best regards,

Trang

Hi Clément,

When obstacle avoidance is enabled, drone maximum horizontal speed is 8 m/s.

See white paper: https://www.parrot.com/assets/s3fs-public/2021-10/white-paper-anafi-ai-v1.5.pdf

Page 12.

Thanks,

PS: this limitation could be added to the documentation of the trajectory fcam template mode.

1 Like

Indeed, I didn’t see it in white paper. Adding it in documentation is a good idea :slight_smile:

Thank you @Ronan !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.