soccer_strategy.robot_controlled_3d.RobotControlled3D
- class soccer_strategy.robot_controlled_3d.RobotControlled3D(team, role, status)[source]
Bases:
RobotControlled
- __init__(team, role, status)[source]
Initializes the robot structure
- Parameters:
robot_id – Integer representing the robot’s id
team – Which team the robot is on
role – Which role on the field
status – What is the current status of the robot
position – X, Y position of the robot where Y is the short length of the field and X is the long length
Methods
__init__
(team, role, status)Initializes the robot structure
action_completed_callback
(data)amcl_pose_callback
(amcl_pose)can_kick
(*args, **kwargs)Whether the robot can kick the ball based on the robot and ball position
get_back_up
([type])Send a command get back up, based on the get up type
get_detected_obstacles
()head_centered_on_ball_callback
(data)imu_callback
(msg)kick
(kick_velocity)Send a command to kick the ball
reset_initial_position
([variance])Set's the robot's position based on the amcl_pose :return:
reset_robot_callback
(pose)run_fixed_trajectory
([trajectory_name])set_navigation_position
(goal_position)Set's the robot's navigation position for the robot to go to :param goal_position: goal_position: [x, y, theta] of the robot's goal position
shorten_navigation_position
(goal_position)Limits the length of the navigation, for example a goal given 2 meters will return a goal determined by the shorten_navigation_limit parameter, if it is 1 then 1 meter max navigation limit :param goal_position: [x, y, theta] of the robot's goal position
Send a command to stop the robot's walking
update_robot_state
(_)Attributes
BODY_LENGTH
BODY_WIDTH
- class Role(value)
Bases:
IntEnum
An enumeration.
- class Status(value)
Bases:
IntEnum
An enumeration.
- class Team(value)
Bases:
IntEnum
An enumeration.
- class TeamColor(value)
Bases:
IntEnum
An enumeration.
- can_kick(*args, **kwargs)[source]
Whether the robot can kick the ball based on the robot and ball position
- Parameters:
ball – Ball object
goal_position – [x, y, theta] of the robot’s goal position
- Returns:
True if the robot can kick the ball
- abstract get_back_up(type: str = 'getupback')
Send a command get back up, based on the get up type
- reset_initial_position(variance=0.02)[source]
Set’s the robot’s position based on the amcl_pose :return:
Set’s the robot’s navigation position for the robot to go to :param goal_position: goal_position: [x, y, theta] of the robot’s goal position
Limits the length of the navigation, for example a goal given 2 meters will return a goal determined by the shorten_navigation_limit parameter, if it is 1 then 1 meter max navigation limit :param goal_position: [x, y, theta] of the robot’s goal position
- abstract terminate_walk()
Send a command to stop the robot’s walking