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配置信息
$ rosed ailibot_bringup robot_type_d2.yaml

ailibot_base: "d2" //底盘型号: d2 | d4 | t2 | t4 | o3 | o4 | m4 | a1 | a2

motor_driver: "BTS7960" //电机驱动器

imu_type: "GY85" //imu类型

debug: 1 // 调试模式,1表示ture,0表示false

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

max_rpm: 366 // 最大转速
counts_per_rev: 1560 // 车轮编码器的每转脉冲数
wheel_diameter: 0.095 // 车轮直径
pwm_bits: 8 // PWM分辨率
lr_wheels_distance: 0.37 // 左右两轮的距离 
fr_wheels_distance: 0.32 // 前后两轮的距离
max_steering_angle: 0.415 // 最大舵机转向角度
robot_radius: 0.22 // 底盘的外切圆

# ROBOT ORIENTATION
#         FRONT
#    MOTOR1  MOTOR2  (2WD/ACKERMANN)
#    MOTOR3  MOTOR4  (4WD/MECANUM/omni4/omni3)  
#         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

# 舵机引脚
steering_pin: 31
  • [Ailibot] 烧录固件,以便传入新参数到驱动板
$ cd ~/tools/ailibot_fm_teensy_release/ && ./firmware_upload.sh 

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

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


标签: ailibot入门教程