Guided target velocity + WPNAV_RADIUS 10cm min

Hi, I’m controlling a copter (with precise localization) in guided mode sending target position and velocity.
Looking at the code I’ve found a couple of things to ask clarification for:

Target Velocity

POSVEL CONTROL
The target velocity on the Z axis seems ignored, set_desired_velocity_xy() is used.

VEL CONTROL:
In vel_control the 3-axis set_desired_velocity() is used instead.

Is this an intended behaviour? Have I misunderstood the code?


WP_NAV_RADIUS

WP_NAV_RADIUS cannot be set to less than 10 centimeters.
In some setups (vision, motion capture) this is way larger than the position accuracy.

By the way, in Guided this parameter is used only in POS CONTROL with wp_nav->update_wpnav(), right?

Probably this minimum can be lowered to 1cm or less…

Here’s a PR on the WPNAV_RADIUS minimum

On The PR Randy explained that:

We added this lower limit after a number of support issues in which users would complain, “my vehicle is getting stuck on the waypoint”. The number “10” is a good because people get confused between cm and m so a user might input “2” (cm) when they mean “2m”. People very rarely want a 10m radius so when this mistake happens it is numbers below 10 that are most common.

To me it is still unclear:

  • if WPNAV_RADIUS is used in GUIDED and if is used only in POS CONTROL like it seems

  • if target velocity on the Z axis is ignored in POSVEL CONTROL and why

2 Likes

Hi @guglie,

I am also interested in your points and just curious that is there any progress on the unclear points?

Hello @guglie, any update on the ignored Z component of target velocity?
It really limits the usefulness of guided mode.