< >
Home » Ailibot实体机器人入门教程 » Ailibot入门教程-安装-固件烧录

Ailibot入门教程-安装-固件烧录

说明

  • 介绍如何在Ailibot上烧录固件

相关设备:

操作步骤

  • [Ailibot] 确认环境配置上的底盘参数AILIBOTBASE
$ cat ~/bashrc
......
source /opt/ros/kinetic/setup.bash
source /home/ubuntu/ailibot_ws/devel/setup.bash
export AILIBOTLIDAR=rplidar
export AILIBOTBASE=d2
  • [Ailibot] 修改Ailibot d2配置信息
$ rosed ailibot_bringup robot_type_d2.yaml

# choose the base you're building . ROBOT Type : d2 | d4 | t2 | t4 | o3 | o4 | m4 | a1 | a2
ailibot_base: "d2" //底盘型号

# Choose the motor driver you're using Motor Type : L298 | BTS7960 | ESC
motor_driver: "BTS7960" //电机驱动器

# Choose the IMU you're using IMU Type : GY85 | MPU6050 | MPU9150 | MPU9250
imu_type: "GY85" //imu类型

# if debug ? 1 for true , 0 for false
debug: 1 // 调试模式,1表示ture,0表示false

# PID  
pid: // PID 参数调节
  k_p: 0.6  #P constant
  k_i: 0.3  #i constant
  k_d: 0.1 #0.5  #d constant



# define your robot' specs here
max_rpm: 366 // 最大转速
max_linear_x: 1.0
max_linear_y: 1.0
max_angular_z: 1.0
counts_per_rev: 1560 // 车轮编码器的每转脉冲数
wheel_diameter: 0.115 // 车轮直径
pwm_bits: 8 // PWM分辨率
lr_wheels_distance: 0.325 // 左右两轮的距离 
fr_wheels_distance: 0.325 // 前后两轮的距离
max_steering_angle: 0.415 // 最大舵机转向角度
robot_radius: 0.19 // 底盘的外切圆

# ROBOT ORIENTATION
#         FRONT
#    MOTOR1  MOTOR2  (2WD/ACKERMANN)
#    MOTOR3  MOTOR4  (4WD/MECANUM)  
#         BACK

// 编码器引脚,默认不需要改动
motor_encode:
  motor1_encoder_a: 8
  motor1_encoder_b: 7
  motor2_encoder_a: 11
  motor2_encoder_b: 12
  motor3_encoder_a: 16
  motor3_encoder_b: 17
  motor4_encoder_a: 14
  motor4_encoder_b: 15

// 电机引脚,默认不需要改动
motor_in:
  motor1_pwm: 1
  motor1_in_a: 4
  motor1_in_b: 3
  motor2_pwm: 8
  motor2_in_a: 5
  motor2_in_b: 6
  motor3_pwm: 0
  motor3_in_a: 23
  motor3_in_b: 22
  motor4_pwm: 2
  motor4_in_a: 20
  motor4_in_b: 21
  pwm_max: 0
  pwm_min: 0

# ENCODER PINS
# MOTOR PINS
motor_in:
  pwm_max: 0
  pwm_min: 0

# STEERING PIN
steering_pin: 31
  • [Ailibot] 烧录固件,以便传入新参数到驱动板
$ cd ~/tools/ailibot_fm_teensy_release/ && ./firmware_upload.sh 
  • d4底盘配置
# choose the base you're building . ROBOT Type : d2 | d4 | t2 | t4 | o3 | o4 | m4 | a1 | a2
ailibot_base: "d4"

# Choose the motor driver you're using Motor Type : L298 | BTS7960 | ESC
motor_driver: "BTS7960"

# Choose the IMU you're using IMU Type : GY85 | MPU6050 | MPU9150 | MPU9250
imu_type: "GY85"

# if debug ? 1 for true , 0 for false
debug: 1

# PID
pid:
  k_p: 0.6  #P constant
  k_i: 0.3 #i constant
  k_d: 0.1  #d constant

# define your robot' specs here
max_rpm: 366
counts_per_rev: 1560
wheel_diameter: 0.115
pwm_bits: 8
lr_wheels_distance: 0.272
fr_wheels_distance: 0.24
max_steering_angle: 0.415
robot_radius: 0.241
  • o3底盘配置
# choose the base you're building . ROBOT Type : d2 | d4 | t2 | t4 | o3 | o4 | m4 | a1 | a2
ailibot_base: "o3"

# Choose the motor driver you're using Motor Type : L298 | BTS7960 | ESC
motor_driver: "BTS7960"

# Choose the IMU you're using IMU Type : GY85 | MPU6050 | MPU9150 | MPU9250
imu_type: "GY85"

# if debug ? 1 for true , 0 for false
debug: 1

# PID  
pid:
  k_p: 0.6  #P constant
  k_i: 0.1  #i constant
  k_d: 0.3  #d constant

# define your robot' specs here
max_rpm: 366
counts_per_rev: 1560
wheel_diameter: 0.085
pwm_bits: 8
lr_wheels_distance: 0.263
fr_wheels_distance: 0.263
max_steering_angle: 0.415
robot_radius: 0.175
  • o4底盘配置
# choose the base you're building . ROBOT Type : d2 | d4 | t2 | t4 | o3 | o4 | m4 | a1 | a2
ailibot_base: "o3"

# Choose the motor driver you're using Motor Type : L298 | BTS7960 | ESC
motor_driver: "BTS7960"

# Choose the IMU you're using IMU Type : GY85 | MPU6050 | MPU9150 | MPU9250
imu_type: "GY85"

# if debug ? 1 for true , 0 for false
debug: 1

# PID  
pid:
  k_p: 0.6  #P constant
  k_i: 0.1  #i constant
  k_d: 0.3  #d constant

# define your robot' specs here
max_rpm: 366
counts_per_rev: 1560
wheel_diameter: 0.085
pwm_bits: 8
lr_wheels_distance: 0.221
fr_wheels_distance: 0.221
max_steering_angle: 0.415
robot_radius: 0.180
  • m4底盘配置
# choose the base you're building . ROBOT Type : d2 | d4 | t2 | t4 | o3 | o4 | m4 | a1 | a2
ailibot_base: "m4"

# Choose the motor driver you're using Motor Type : L298 | BTS7960 | ESC
motor_driver: "BTS7960"

# Choose the IMU you're using IMU Type : GY85 | MPU6050 | MPU9150 | MPU9250
imu_type: "GY85"

# if debug ? 1 for true , 0 for false
debug: 1

# PID  
pid:
  k_p: 0.6  #P constant
  k_i: 0.1  #i constant
  k_d: 0.3  #d constant

# define your robot' specs here
max_rpm: 366
counts_per_rev: 1560
wheel_diameter: 0.103
pwm_bits: 8
lr_wheels_distance: 0.264
fr_wheels_distance: 0.24
max_steering_angle: 0.415
robot_radius: 0.231

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ailibot入门教程