The
marvin driver implements the position control for the Marvin robots using 2 motors. Although someday this could be a generic mobile robot interface for using motors, we're starting out with the Marvin platform.
- Provides
- position : Interface to the mobile robot
- Requires
- motor : Interface to the left motor
- motor : Interface to the right motor
- Configuration requests
- position
- PLAYER_POSITION_GET_GEOM_REQ
- PLAYER_POSITION_SET_ODOM_REQ :
- PLAYER_POSITION_RESET_ODOM_REQ :
- PLAYER_POSITION_POWER_REQ :
- PLAYER_POSITION_SPEED_PID_REQ :
- PLAYER_POSITION_POSITION_PID_REQ :
- PLAYER_POSITION_SPEED_PROF_REQ :
- Configuration file options
- length (float)
- width (float)
- wheel_base (float)
- wheel_radius (float)
- left_direction (int)
- right_direction (int)
- k_rho (float)
- Default: 1
- Note: To be stable: k_rho > 0
- k_beta (float)
- Default: -1
- Note: To be stable: k_beta < 0
- k_alpha (float)
- Default: 2
- Note: To be stable: k_alpha-k_rho > 0
- geom_pose_x (float)
- Default: 0
- The x offset for the get geometry command. This will enable you to change the center of mass of your robot for devices that need such a thing. Stored in [m].
- geom_pose_y (float)
- Default: 0
- The y offset for the get geometry command. This will enable you to change the center of mass of your robot for devices that need such a thing. Stored in [m].
- geom_pose_theta (float)
- Default: 0
- The theta offset for the get geometry command. This will enable you to change the center of mass of your robot for devices that need such a thing. Stored in radians.
- max_velocity (float)
- Default: 1 m/2
- The maximum speed of the platform.
- translate_deadzone (float)
- Default: 0.005
- When in position mode, how close to get to the target before stopping.
- If set to 0, operation is undefined (the equations are undefined)
- rotate_deadzone (float)
- Default: DTOR(5)
- When in position mode, how close to get to the target before stopping.
- If set to 0, operation is undefined (the equations are undefined)
- frequency (int)
- Default: 100 [hz]
- This is the frequency that data will be updated and commands processed.
- Notes
- Example: Using a Marvin robot
The following configuration file illustrates the use of the
marvin driver on a Marvin robot:
driver
(
plugin "libmendriver.so"
name "mendriver"
provides ["left::motor:0"
"right::motor:1"
"motor:2"
"motor:3"
"motor:4"
"motor:5"
"motor:6"
"motor:7"
"aio:0"
"dio:0"]
alwayson 1
# Motor 0
encoder_count_0 1024
gear_ratio_0 28
enabled_0 0
position_kp_0 10.500
position_ki_0 00.080
position_kd_0 00.100
velocity_kp_0 00.500
velocity_ki_0 05.000
velocity_kd_0 00.001
override_limits_0 0
max_velocity_0 10.000
encoder_direction_0 -1
# Motor 1
encoder_count_1 1024
encoder_direction_1 -1
gear_ratio_1 28
enabled_1 0
position_kp_1 10.500
position_ki_1 00.080
position_kd_1 00.100
velocity_kp_1 00.500
velocity_ki_1 05.000
velocity_kd_1 00.001
override_limits_1 0
max_velocity_1 10.000
)
driver (
name "marvindriver"
plugin "libmarvindriver.so"
provides ["position:0"]
requires [ "left::motor:0"
"right::motor:1"
]
length 0.450
width 0.348
wheel_base 0.324
wheel_radius 0.038
left_direction 1
right_direction -1
frequency 100
# 5 degrees
rotate_deadzone 0.87
# 5cm
translate_deadzone 0.005
# To be locally stable:
# k_rho > 0
# k_beta < 0
# k_alpha + 5/3*k_beta - 2 / M_PI * k_rho > 0
k_rho 00.50
k_beta -10.00
k_alpha 20.00
)
driver
(
name "sicklms200"
provides ["laser:0"]
port "/dev/ttyS0"
delay 0
pose [0.15 0 0]
resolution 50
range_res 1
invert 0
)