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