robot_smach_states.navigation.control_to_pose¶
Classes¶
position_gain: (float) Tunable parameter to increase or decrease the change in position per time |
|
State that allows the tuning of robot navigation to a specific goal through custom speeds, gains and tolerances |
Functions¶
|
|
Returns the yaw angle from a rotation in quaternion representation (msg) |
Module Contents¶
- robot_smach_states.navigation.control_to_pose._clamp(abs_value, value)¶
- robot_smach_states.navigation.control_to_pose._get_yaw_from_quaternion_msg(msg)¶
Returns the yaw angle from a rotation in quaternion representation (msg)
- Parameters:
msg – The quaternion msg
- Returns:
(float) Yaw angle in rad
- class robot_smach_states.navigation.control_to_pose.ControlParameters¶
Bases:
namedtuple
('ControlParameters'
, ['position_gain'
,'rotation_gain'
,'abs_vx'
,'abs_vy'
,'abs_vyaw'
,'goal_position_tolerance'
,'goal_rotation_tolerance'
])position_gain: (float) Tunable parameter to increase or decrease the change in position per time rotation_gain: (float) Tunable parameter to increase or decrease the change in yaw per time abs_vx: (float) Absolute velocity in x [m/s] abs_vy: (float) Absolute velocity in y [m/s] abs_vyaw: (float) Absolute velocity in yaw [rad/s] goal_position_tolerance: (float) Tolerance in position [m] goal_rotation_tolerance: (float) Tolerance in yaw [rad]
Initialize self. See help(type(self)) for accurate signature.
- class robot_smach_states.navigation.control_to_pose.ControlToPose(robot, goal_pose, control_parameters, rate=10)¶
Bases:
smach.State
State that allows the tuning of robot navigation to a specific goal through custom speeds, gains and tolerances
- Parameters:
robot – (Robot) api object
goal_pose – (PoseStamped or Designator to PoseStamped) Position the robot needs to go to
control_parameters – (namedtuple, ControlParameters) Parameters that specify how the robot should reach
rate – (float, int) Control rate [Hz]
- robot¶
- goal_pose¶
- params¶
- _rate = 10¶
- execute(userdata=None)¶
- _get_target_delta_in_robot_frame(goal_pose)¶
Transfers the goal pose to robot frame
- Parameters:
goal_pose – (PoseStamped) Position the robot needs to go to
- Returns:
(float) x position of goal in robot frame, (float) y position of goal in robot frame, (float) yaw of goal in robot frame
- _goal_reached(dx, dy, dyaw)¶
Checks if the goal pose is reached
- Parameters:
dx – (float)[m] Margin between goal_pose and robot in x
dy – (float)[m] Margin between goal_pose and robot in y
dyaw – (float)[rad] Margin between goal_pose and robot in yaw
- Returns:
(bool) Boolean indicating whether the margins are reached