Skip to main content

pamoja_obstacle_stop

Function pamoja_obstacle_stop 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_obstacle_stop( twist: PamojaTwist, range_m: f32, stop_distance_m: f32, ) -> PamojaTwist
Expand description

Cuts forward and sideways motion when an obstacle is within the stopping distance.

§Arguments

  • twist - the requested motion.
  • range_m - the nearest range ahead, in meters.
  • stop_distance_m - the range at or below which motion is cut; its magnitude is used.

§Returns

twist while the way is clear, or it with no forward or sideways speed, keeping the turn. A range that is not a number counts as an obstacle.