Public Member Functions | |
def | __del__ (self) |
def | __init__ (self, full_dof=False, stamped_pose_only=False, thrusters_only=True) |
def | generate_reference (self, t) |
def | get_idle_circle_path (self, n_points, radius=30) |
def | get_vehicle_rot (self) |
def | go_to (self, request) |
def | go_to_incremental (self, request) |
def | has_finished (self) |
def | has_started (self) |
def | hold_vehicle (self, request) |
def | init_waypoints_from_file (self, request) |
def | interpolate (self, t) |
def | is_automatic_on (self) |
def | is_station_keeping_on (self) |
def | set_automatic_mode (self, is_on=True) |
def | set_station_keeping (self, is_on=True) |
def | set_trajectory_running (self, is_on=True) |
def | start_circle (self, request) |
def | start_helix (self, request) |
def | start_station_keeping (self) |
def | start_waypoint_list (self, request) |
def | update_vehicle_pose (self, pos, quat) |
Public Attributes | |
inertial_frame_id | |
init_odom_event | |
q_ned_to_enu | |
transform_ned_to_enu | |
Private Member Functions | |
def | _apply_workspace_constraints (self, waypoint_set) |
def | _calc_smooth_approach (self) |
def | _calc_teleop_reference (self) |
def | _publish_trajectory_info (self, event) |
def | _transform_position (self, vec, target, source) |
def | _transform_waypoint (self, waypoint) |
def | _transform_waypoint_set (self, waypoint_set) |
def | _update_teleop (self, msg) |
def | _update_trajectory_from_msg (self, msg) |
def | _update_trajectory_info (self) |
Local planner for the dynamic positioning controllers to interpolate trajectories and generate trajectories from interpolated waypoint paths. > *Input parameters* * `full_dof` (*type:* `bool`, *default:* `False`): If `True`, the reference trajectory reference will be computed for 6 DoF, otherwise, 4 DoF `(x, y, z, yaw)`. * `stamped_pose_only` (*type:* `bool`, *default:* `False`): If `True`, only stamped poses will be generated as a reference, with velocity and acceleration reference being set to zero. * `thrusters_only` (*type:* `bool`, *default:* `True`): If `False`, the idle mode will be used to keep the vehicle moving. > *ROS parameters* * `max_forward_speed` (*type:* `float`, *default:* `1.0`): Maximum allowed forward speed. * `idle_radius` (*type:* `float`, *default:* `10.0`): Radius of the circle path generated when an AUV is in idle mode. * `inertial_frame_id` (*type:* `str`): Name of the inertial frame used, options are `world` or `world_ned`. * `timeout_idle_mode` (*type:* `float`): Timeout at the start or after a trajectory is finished where the AUV is set to start idle mode path. * `look_ahead_delay` (*type:* `float`): Look ahead delay in seconds. This parameters will offset the interpolation of the trajectory in the given amount of seconds to compute the look-ahead target for AUVs. !!! warning The parameters for the path interpolators must also be provided when starting a node that includes the local planner, since the interpolators are initialized by the local planner. > *ROS publishers* * `trajectory` (*type:* `uuv_control_msgs.Trajectory`): Generated trajectory or stamped pose path. * `waypoints` (*type:* `uuv_control_msgs.WaypointSet`): Set of waypoints provided as input for the interpolator * `station_keeping_on` (*type:* `std_msgs.Bool`): Status of the station keeping mode * `automatic_on` (*type:* `std_msgs.Bool`): Status of automatic model. If `False` the vehicle can receive control inputs from a teleop node. * `trajectory_tracking_on` (*type:* `std_msgs.Bool`): Sets the output flag to `True` when trajectory tracking is ongoing * `interpolator_visual_markers` (*type:* `visualization_msgs.MarkerArray`): Helper visual markers from the interpolator class. * `time_to_target` (*type:* `std_msgs.Float64`): Estimated time to target in seconds. > *ROS services* * `hold_vehicle` (*type:* `uuv_control_msgs.Hold`) * `start_waypoint_list` (*type:* `uuv_control_msgs.InitWaypointSet`) * `start_circular_trajectory` (*type:* `uuv_control_msgs.InitCircularTrajectory`) * `start_helical_trajectory` (*type:* `uuv_control_msgs.InitHelicalTrajectory`) * `init_waypoints_from_file` (*type:* `uuv_control_msgs.InitWaypointsFromFile`) * `go_to` (*type:* `uuv_control_msgs.GoTo`) * `go_to_incremental` (*type:* `uuv_control_msgs.GoToIncremental`)
Definition at line 39 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.__init__ | ( | self, | |
full_dof = False , |
|||
stamped_pose_only = False , |
|||
thrusters_only = True |
|||
) |
Definition at line 101 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.__del__ | ( | self | ) |
Remove logging message handlers
Definition at line 274 of file dp_controller_local_planner.py.
|
private |
Filter out waypoints that are positioned above sea surface, namely `z > 0` if the inertial frame is `world`, or `z < 0` if the inertial frame is `world_ned`. > *Input arguments* * `waypoint_set` (*type:* `uuv_waypoins.WaypointSet`): Set of waypoints > *Returns* `uuv_waypoins.WaypointSet`: Filtered set of waypoints
Definition at line 338 of file dp_controller_local_planner.py.
|
private |
Add the current vehicle position as waypoint to allow a smooth approach to the given trajectory.
Definition at line 473 of file dp_controller_local_planner.py.
|
private |
Compute pose and velocity reference using the joystick linear and angular velocity input.
Definition at line 425 of file dp_controller_local_planner.py.
|
private |
Publish messages for the waypoints, trajectory and debug flags.
Definition at line 362 of file dp_controller_local_planner.py.
|
private |
Transform the position vector between `world` and `world_ned`. > *Input arguments* * `vec` (*type:* `numpy.array`): Position vector * `target` (*type:* `str`): Target frame * `source` (*type:* `str`): Source frame > *Returns* `numpy.array`: Transformed vector
Definition at line 279 of file dp_controller_local_planner.py.
|
private |
Transform position vector of a waypoint between `world` and `world_ned` frames. > *Input arguments* * `waypoint` (*type:* `uuv_waypoints.Waypoint`): Input waypoint > *Returns* `uuv_waypoints.Waypoint`: Transformed waypoint
Definition at line 299 of file dp_controller_local_planner.py.
|
private |
Apply transformation between `world` and 'world_ned` frames to waypoints in a waypoint set. > *Input arguments* * `waypoint_set` (*type:* `uuv_waypoins.WaypointSet`): Set of waypoints > *Returns* `uuv_waypoins.WaypointSet`: Set of transformed waypoints
Definition at line 319 of file dp_controller_local_planner.py.
|
private |
Callback to the twist teleop subscriber.
Definition at line 398 of file dp_controller_local_planner.py.
|
private |
Definition at line 582 of file dp_controller_local_planner.py.
|
private |
Update the trajectory message.
Definition at line 380 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.generate_reference | ( | self, | |
t | |||
) |
Return a trajectory point computed by the interpolator for the timestamp `t`, in case the vehicle is on `automatic` mode. In case it is in station keeping, the pose is kept constant. > *Input arguments* * `t` (*type:* `float`): Timestamp > *Returns* `uuv_trajectory_generator.TrajectoryPoint`: Trajectory point
Definition at line 1003 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.get_idle_circle_path | ( | self, | |
n_points, | |||
radius = 30 |
|||
) |
Generate a waypoint set starting from the current position of the vehicle in the shape of a circle to initialize an AUVs idle mode. > *Input arguments* * `n_points` (*type:* `int`): Number of waypoints * `radius` (*type:* `float`): Circle radius in meters > *Returns* `uuv_waypoints.WaypointSet`: Set of waypoints for idle mode
Definition at line 1022 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.get_vehicle_rot | ( | self | ) |
Return the vehicle's rotation quaternion.
Definition at line 577 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.go_to | ( | self, | |
request | |||
) |
Service callback function to initialize to set one target waypoint . > *Input arguments* * `request` (*type:* `uuv_control_msgs.GoTo`)
Definition at line 884 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.go_to_incremental | ( | self, | |
request | |||
) |
Service callback to set the command to the vehicle to move to a relative position in the world. > *Input arguments* * `request` (*type:* `uuv_control_msgs.GoToIncremental`)
Definition at line 942 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.has_finished | ( | self | ) |
Return `True` if the trajectory has finished.
Definition at line 558 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.has_started | ( | self | ) |
Return if the trajectory interpolator has started generating reference points.
Definition at line 551 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.hold_vehicle | ( | self, | |
request | |||
) |
Service callback function to hold the vehicle's current position.
Definition at line 601 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.init_waypoints_from_file | ( | self, | |
request | |||
) |
Service callback function to initialize the path interpolator with a set of waypoints loaded from a YAML file. > *Input arguments* * `request` (*type:* `uuv_control_msgs.InitWaypointsFromFile`)
Definition at line 829 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.interpolate | ( | self, | |
t | |||
) |
Function interface to the controller. Calls the interpolator to calculate the current trajectory sample or returns a fixed position based on the past odometry measurements for station keeping. > *Input arguments* * `t` (*type:* `float`): Timestamp > *Returns* `uuv_trajectory_generator.TrajectoryPoint`: Trajectory point
Definition at line 1065 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.is_automatic_on | ( | self | ) |
Return `True` if vehicle if following a trajectory in automatic mode.
Definition at line 525 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.is_station_keeping_on | ( | self | ) |
Return `True`, if vehicle is holding its position.
Definition at line 521 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.set_automatic_mode | ( | self, | |
is_on = True |
|||
) |
Set automatic mode flag.
Definition at line 541 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.set_station_keeping | ( | self, | |
is_on = True |
|||
) |
Set station keeping mode flag. > *Input arguments* * `is_on` (*type:* `bool`, *default:* `True`): Station keeping flag
Definition at line 531 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.set_trajectory_running | ( | self, | |
is_on = True |
|||
) |
Set trajectory tracking flag.
Definition at line 546 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.start_circle | ( | self, | |
request | |||
) |
Service callback function to initialize a parametrized circular trajectory. > *Input arguments* * `request` (*type:* `uuv_control_msgs.InitCircularTrajectory`)
Definition at line 668 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.start_helix | ( | self, | |
request | |||
) |
Service callback function to initialize a parametrized helical trajectory. > *Input arguments* * `request` (*type:* `uuv_control_msgs.InitHelicalTrajectory`)
Definition at line 744 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.start_station_keeping | ( | self | ) |
Start station keeping mode by setting the pose set-point of the vehicle as the last pose before the vehicle finished automatic mode.
Definition at line 588 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.start_waypoint_list | ( | self, | |
request | |||
) |
Service callback function to follow a set of waypoints > *Input arguments* * `request` (*type:* `uuv_control_msgs.InitWaypointSet`)
Definition at line 611 of file dp_controller_local_planner.py.
def uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.update_vehicle_pose | ( | self, | |
pos, | |||
quat | |||
) |
Update the vehicle's pose information. > *Input arguments* * `pos` (*type:* `numpy.array`): Position vector * `quat` (*type:* `numpy.array`): Quaternion as `(qx, qy, qz, qw)`
Definition at line 562 of file dp_controller_local_planner.py.
|
private |
Definition at line 216 of file dp_controller_local_planner.py.
|
private |
Definition at line 180 of file dp_controller_local_planner.py.
|
private |
Definition at line 112 of file dp_controller_local_planner.py.
|
private |
Definition at line 117 of file dp_controller_local_planner.py.
|
private |
Definition at line 113 of file dp_controller_local_planner.py.
|
private |
Definition at line 234 of file dp_controller_local_planner.py.
|
private |
Definition at line 224 of file dp_controller_local_planner.py.
|
private |
Definition at line 244 of file dp_controller_local_planner.py.
|
private |
Definition at line 184 of file dp_controller_local_planner.py.
|
private |
Definition at line 123 of file dp_controller_local_planner.py.
|
private |
Definition at line 182 of file dp_controller_local_planner.py.
|
private |
Definition at line 104 of file dp_controller_local_planner.py.
|
private |
Definition at line 102 of file dp_controller_local_planner.py.
|
private |
Definition at line 197 of file dp_controller_local_planner.py.
|
private |
Definition at line 110 of file dp_controller_local_planner.py.
|
private |
Definition at line 237 of file dp_controller_local_planner.py.
|
private |
Definition at line 256 of file dp_controller_local_planner.py.
|
private |
Definition at line 252 of file dp_controller_local_planner.py.
|
private |
Definition at line 254 of file dp_controller_local_planner.py.
|
private |
Definition at line 192 of file dp_controller_local_planner.py.
|
private |
Definition at line 201 of file dp_controller_local_planner.py.
|
private |
Definition at line 242 of file dp_controller_local_planner.py.
|
private |
Definition at line 212 of file dp_controller_local_planner.py.
|
private |
Definition at line 228 of file dp_controller_local_planner.py.
|
private |
Definition at line 186 of file dp_controller_local_planner.py.
|
private |
Definition at line 250 of file dp_controller_local_planner.py.
|
private |
Definition at line 194 of file dp_controller_local_planner.py.
|
private |
Definition at line 191 of file dp_controller_local_planner.py.
|
private |
Definition at line 239 of file dp_controller_local_planner.py.
|
private |
Definition at line 106 of file dp_controller_local_planner.py.
|
private |
Definition at line 246 of file dp_controller_local_planner.py.
|
private |
Definition at line 220 of file dp_controller_local_planner.py.
|
private |
Definition at line 231 of file dp_controller_local_planner.py.
|
private |
Definition at line 204 of file dp_controller_local_planner.py.
|
private |
Definition at line 248 of file dp_controller_local_planner.py.
|
private |
Definition at line 230 of file dp_controller_local_planner.py.
|
private |
Definition at line 208 of file dp_controller_local_planner.py.
uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.inertial_frame_id |
Definition at line 125 of file dp_controller_local_planner.py.
uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.init_odom_event |
Definition at line 188 of file dp_controller_local_planner.py.
uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.q_ned_to_enu |
Definition at line 127 of file dp_controller_local_planner.py.
uuv_control_interfaces.dp_controller_local_planner.DPControllerLocalPlanner.transform_ned_to_enu |
Definition at line 126 of file dp_controller_local_planner.py.