Robot States Script
- Subscribes to:
/odom
- Uses Service:
/state/set_battery_level
/state/get_battery_level
/state/get_pose
/state/set_base_movement_state
/state/get_base_movement_state
This node defines battery level, robot pose and robot base movement state in order to be used by other nodes in the software architecture.
- class scripts.robot_states.RobotState[source]
Inits
robot-states
node to provide some usefull information about robot current state, such as pose, battery level and base movement state- get_base_movement_state(request)[source]
The state/get_base_movement_state service implementation. The request input parameter is given by the client as empty. Thus, it is not used. The response returned to the client contains the current robot base movement state.
- Parameters
request (GetBaseMovementStateRequest) –
- Returns
response(GetBaseMovementStateResponse)
- get_battery_level(request)[source]
The state/get_battery_level service implementation. The request input parameter is given by the client as empty. Thus, it is not used. The response returned to the client contains the current robot battery level.
- Parameters
request (GetBatteryLevelRequest) –
- Returns
response(GetBatteryLevelResponse)
- get_pose(request)[source]
The state/get_pose service implementation. The request input parameter is given by the client as empty. Thus, it is not used. The response returned to the client contains the current robot pose.
- Parameters
request (GetPoseRequest) –
- Returns
response(GetPoseResponse)
- odom_callback(data)[source]
Callback function for
/odom
topic subscriber, update robot current pose inrobot-states
node.- Parameters
data (nav_msgs.msg.Odometry) –