mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 06:10:35 +08:00
Convert L1 controller to local coordinates
This commit is contained in:
committed by
JaeyoungLim
parent
897506267d
commit
28d34bf095
@@ -281,7 +281,11 @@ RoverPositionControl::control_position(const matrix::Vector2d ¤t_position,
|
||||
_pos_ctrl_state = STOPPING; // We are closer than loiter radius to waypoint, stop.
|
||||
|
||||
} else {
|
||||
_gnd_control.navigate_waypoints(prev_wp, curr_wp, current_position, ground_speed_2d);
|
||||
Vector2f curr_pos_local{_local_pos.x, _local_pos.y};
|
||||
Vector2f curr_wp_local = _global_local_proj_ref.project(curr_wp(0), curr_wp(1));
|
||||
Vector2f prev_wp_local = _global_local_proj_ref.project(prev_wp(0),
|
||||
prev_wp(1));
|
||||
_gnd_control.navigate_waypoints(prev_wp_local, curr_wp_local, curr_pos_local, ground_speed_2d);
|
||||
|
||||
_act_controls.control[actuator_controls_s::INDEX_THROTTLE] = mission_throttle;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user