position2d
[Interface specifications]

Collaboration diagram for position2d:


Detailed Description

Planar mobile robot.

The position2d interface is used to control mobile robot bases in 2D.

#define PLAYER_POSITION2D_REQ_GET_GEOM   1
 Request/reply: geometry.
#define PLAYER_POSITION2D_REQ_MOTOR_POWER   2
 Request/reply: Motor power.
#define PLAYER_POSITION2D_REQ_VELOCITY_MODE   3
 Request/reply: Change velocity control.
#define PLAYER_POSITION2D_REQ_POSITION_MODE   4
 Request/reply: Change control mode.
#define PLAYER_POSITION2D_REQ_SET_ODOM   5
 Request/reply: Set odometry.
#define PLAYER_POSITION2D_REQ_RESET_ODOM   6
 Request/reply: Reset odometry.
#define PLAYER_POSITION2D_REQ_SPEED_PID   7
 Request/reply: Set velocity PID parameters.
#define PLAYER_POSITION2D_REQ_POSITION_PID   8
 Request/reply: Set position PID parameters.
#define PLAYER_POSITION2D_REQ_SPEED_PROF   9
 Request/reply: Set linear speed profile parameters.
#define PLAYER_POSITION2D_DATA_STATE   1
 Data: state (PLAYER_POSITION2D_DATA_STATE).
#define PLAYER_POSITION2D_DATA_GEOM   2
 Data: geometry.
#define PLAYER_POSITION2D_CMD_VEL   1
 Command: velocity (PLAYER_POSITION2D_CMD_VEL).
#define PLAYER_POSITION2D_CMD_POS   2
 Command: position (PLAYER_POSITION2D_CMD_POS).
#define PLAYER_POSITION2D_CMD_CAR   3
 Command: carlike (PLAYER_POSITION2D_CMD_CAR).
#define PLAYER_POSITION2D_CMD_VEL_HEAD   4
 Command: vel/head (PLAYER_POSITION2D_CMD_VEL_HEAD).
typedef player_position2d_data player_position2d_data_t
 position2d data
typedef player_position2d_cmd_vel player_position2d_cmd_vel_t
 position 2d velocity command
typedef player_position2d_cmd_pos player_position2d_cmd_pos_t
 position2d position command
typedef player_position2d_cmd_car player_position2d_cmd_car_t
 position2d command setting velocity and steering angle
typedef player_position2d_cmd_vel_head player_position2d_cmd_vel_head_t
 position2d command setting velocity and heading
typedef player_position2d_geom player_position2d_geom_t
 position2d geom
typedef player_position2d_power_config player_position2d_power_config_t
 position2d power config
typedef player_position2d_velocity_mode_config player_position2d_velocity_mode_config_t
 position2d velocity mode config
typedef player_position2d_position_mode_req player_position2d_position_mode_req_t
 position2d position mode request
typedef player_position2d_set_odom_req player_position2d_set_odom_req_t
 set odometry
typedef player_position2d_speed_pid_req player_position2d_speed_pid_req_t
 position2d speed PID req
typedef player_position2d_position_pid_req player_position2d_position_pid_req_t
 position2d position pid req
typedef player_position2d_speed_prof_req player_position2d_speed_prof_req_t
 speed prof req

Define Documentation

#define PLAYER_POSITION2D_CMD_CAR   3

Command: carlike (PLAYER_POSITION2D_CMD_CAR).

The position interface accepts carlike translational velocity + constant turn commands (speed and turning angle) for the robot's motors (only supported by some drivers).

Definition at line 4721 of file player_interfaces.h.

Referenced by Erratic::HandleCommand(), and ER::ProcessMessage().

#define PLAYER_POSITION2D_CMD_POS   2

Command: position (PLAYER_POSITION2D_CMD_POS).

The position interface accepts new positions for the robot's motors (drivers may support position control, speed control, or both).

Definition at line 4715 of file player_interfaces.h.

Referenced by GarciaDriver::ProcessMessage().

#define PLAYER_POSITION2D_CMD_VEL   1

Command: velocity (PLAYER_POSITION2D_CMD_VEL).

The position interface accepts new velocities for the robot's motors (drivers may support position control, speed control, or both).

Definition at line 4708 of file player_interfaces.h.

Referenced by wbr914::HandleCommand(), P2OS::HandleCommand(), Erratic::HandleCommand(), SegwayRMP::ProcessMessage(), RFLEX::ProcessMessage(), P2OS::ProcessMessage(), Khepera::ProcessMessage(), GarciaDriver::ProcessMessage(), ER::ProcessMessage(), and ClodBuster::ProcessMessage().

#define PLAYER_POSITION2D_CMD_VEL_HEAD   4

Command: vel/head (PLAYER_POSITION2D_CMD_VEL_HEAD).

The position interface accepts translational velocity + absolute heading commands (speed and angular position) for the robot's motors (only supported by some drivers).

Definition at line 4726 of file player_interfaces.h.

Referenced by Erratic::HandleCommand().

#define PLAYER_POSITION2D_DATA_GEOM   2

Data: geometry.

This messages is published by drivers which can change their geometry at run time

Definition at line 4701 of file player_interfaces.h.

#define PLAYER_POSITION2D_DATA_STATE   1

#define PLAYER_POSITION2D_REQ_GET_GEOM   1

#define PLAYER_POSITION2D_REQ_MOTOR_POWER   2

Request/reply: Motor power.

On some robots, the motor power can be turned on and off from software. To do so, send a PLAYER_POSITION2D_REQ_MOTOR_POWER request with the format given below, and with the appropriate state (zero for motors off and non-zero for motors on). Null response.

Be VERY careful with this command! You are very likely to start the robot running across the room at high speed with the battery charger still attached.

Definition at line 4623 of file player_interfaces.h.

Referenced by wbr914::HandleConfig(), P2OS::HandleConfig(), Erratic::HandleConfig(), SegwayRMP::HandlePositionConfig(), RFLEX::ProcessMessage(), REB::ProcessMessage(), Khepera::ProcessMessage(), ER::ProcessMessage(), and ClodBuster::ProcessMessage().

#define PLAYER_POSITION2D_REQ_POSITION_MODE   4

Request/reply: Change control mode.

To change control mode, send a PLAYER_POSITION2D_REQ_POSITION_MODE request. Null response.

Definition at line 4656 of file player_interfaces.h.

Referenced by REB::ProcessMessage().

#define PLAYER_POSITION2D_REQ_POSITION_PID   8

Request/reply: Set position PID parameters.

To set position PID parameters, send a PLAYER_POSITION2D_REQ_POSITION_PID request. Null response.

Definition at line 4683 of file player_interfaces.h.

Referenced by REB::ProcessMessage().

#define PLAYER_POSITION2D_REQ_RESET_ODOM   6

#define PLAYER_POSITION2D_REQ_SET_ODOM   5

Request/reply: Set odometry.

To set the robot's odometry to a particular state, send a PLAYER_POSITION2D_REQ_SET_ODOM request. Null response.

Definition at line 4662 of file player_interfaces.h.

Referenced by wbr914::HandleConfig(), P2OS::HandleConfig(), Erratic::HandleConfig(), RFLEX::ProcessMessage(), REB::ProcessMessage(), Khepera::ProcessMessage(), ER::ProcessMessage(), and ClodBuster::ProcessMessage().

#define PLAYER_POSITION2D_REQ_SPEED_PID   7

Request/reply: Set velocity PID parameters.

To set velocity PID parameters, send a PLAYER_POSITION2D_REQ_SPEED_PID request. Null response.

Definition at line 4675 of file player_interfaces.h.

Referenced by REB::ProcessMessage(), and ClodBuster::ProcessMessage().

#define PLAYER_POSITION2D_REQ_SPEED_PROF   9

Request/reply: Set linear speed profile parameters.

To set linear speed profile parameters, send a PLAYER_POSITION2D_REQ_SPEED_PROF request. Null response.

Definition at line 4689 of file player_interfaces.h.

Referenced by REB::ProcessMessage().

#define PLAYER_POSITION2D_REQ_VELOCITY_MODE   3

Request/reply: Change velocity control.

Some robots offer different velocity control modes. It can be changed by sending a PLAYER_POSITION2D_REQ_VELOCITY_MODE request with the format given below, including the appropriate mode. No matter which mode is used, the external client interface to the position device remains the same. Null response.

The p2os driver offers two modes of velocity control: separate translational and rotational control and direct wheel control. When in the separate mode, the robot's microcontroller internally computes left and right wheel velocities based on the currently commanded translational and rotational velocities and then attenuates these values to match a nice predefined acceleration profile. When in the direct mode, the microcontroller simply passes on the current left and right wheel velocities. Essentially, the separate mode offers smoother but slower (lower acceleration) control, and the direct mode offers faster but jerkier (higher acceleration) control. Player's default is to use the direct mode. Set mode to zero for direct control and non-zero for separate control.

For the reb driver, 0 is direct velocity control, 1 is for velocity-based heading PD controller.

Definition at line 4649 of file player_interfaces.h.

Referenced by P2OS::HandleConfig(), Erratic::HandleConfig(), RFLEX::ProcessMessage(), REB::ProcessMessage(), Khepera::ProcessMessage(), and ClodBuster::ProcessMessage().


Last updated 12 September 2005 21:38:45