Change maxVelocity of TrajectoryFcamMode


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 ?



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(); 

For your information, the documentation of

  • Class Mode is here

  • Class Output is here

  • Class HorizontalReference is here

Best regards,

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 ?


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,


Hi Clément,

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

See white paper:

Page 12.


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.