The
men driver implements low level I/O control through Player for devices equipped with the following arrangement of I/O cards by MEN.
- M33 : 8 channel DAC
- M34 : 16 channel ADC
- M66 : 32 channel DIO
- 2 x M72 : 4 channel encoder
- Provides
- motor : 8 interfaces to motors
- aio : 1 interfaces to the ADC channels
- currently only supports 1 interface of 8 channels
- dio : 1 interface to the DIO.
- 16 channel input
- 16 channel output
- Requires
Nothing.
- Configuration requests
- motor
- PLAYER_MOTOR_SET_ODOM_REQ :
- PLAYER_MOTOR_RESET_ODOM_REQ :
- PLAYER_MOTOR_POWER_REQ :
- PLAYER_MOTOR_POSITION_MODE_REQ :
- PLAYER_MOTOR_SPEED_PID_REQ :
- PLAYER_MOTOR_POSITION_PID_REQ :
- PLAYER_MOTOR_SPEED_PROF_REQ :
- aio
- dio
- Configuration file options
- Motor settings : Since we have multiple motors, you need to append the motor id to the configuration option in place of the x.
- gear_ratio_x (int)
- encoder_count_x (int)
- Default: 0
- Number of encoder tics per rotation
- position_mode_x (int)
- Default: 0
- Are we controlling the motors in position or velocity mode to start with 0 = VELOCITY, 1 = POSITION
- enabled_x (0)
- Default: 0
- Are the motors enabled initially?
- velocity_kp_x (float)
- Default: 0
- Default velocity PID parameters
- velocity_ki_x (float)
- Default: 0
- Default velocity PID parameters
- velocity_kd_x (float)
- Default: 0
- Default velocity PID parameters
- position_kp_x (float)
- Default: 0
- Default position PID parameters
- position_ki_x (float)
- Default: 0
- Default position PID parameters
- position_kd_x (float)
- Default: 0
- Default position PID parameters
- int_previous_vel_sat_x (float)
- Default: 5.0
- This is a saturation point for the integral term in the PID controller. By having a limit, we can help prevent excessive windup if the motor gets stuck.
- int_previous_pos_sat_x (float)
- Default: 5.0
- This is a saturation point for the integral term in the PID controller. By having a limit, we can help prevent excessive windup if the motor gets stuck.
- override_limits_x (int)
- Default: 1
- Should we ignore the limit switches in software? (limit switches not currently implemented)
- max_velocity_x (float)
- voltage_limit_x (float)
- Default: 10.0
- The maximum output voltage that the cards will send
- voltage_offset_x (float)
- Default: 0
- If a DC voltage offset is needed on the ADC
- max_theta_x (float)
- Default: 0
- These are software limit switches. If max_theta == min_theta then no limits are used.
- min_theta_x (float)
- Default: 0
- These are software limit switches. If max_theta == min_theta then no limits are used.
- encoder_direction_x (int)
- Default: -1
- Are the encoders counting positive when the motor is rotation forward or backward?
- Dio settings:
- Aio settings:
- Notes
- Example 1: Using the basic MEN driver
The following configuration file illustrates the basic use of the
MEN driver:
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 1
max_velocity_0 20.000
# Motor 1
encoder_count_1 1024
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 1
max_velocity_1 20.000
)