Robobot base software installation: Difference between revisions

From Rsewiki
Line 59: Line 59:
  max_logging_minutes = 1000
  max_logging_minutes = 1000
  log_service = true
  log_service = true
  [mqtt]
  [mqtt]
  broker = tcp://localhost:1883
  broker = tcp://localhost:1883
Line 68: Line 69:
  print = false
  print = false
  use = true
  use = true
  [teensy0]
  [teensy0]
  use = true
  use = true
Line 80: Line 82:
  encrev = true
  encrev = true
  hardware = 8
  hardware = 8
  [robot0]
  [robot0]
  log = true
  log = true
Line 87: Line 90:
  batteryusedwh = 242.503580
  batteryusedwh = 242.503580
  batterycalibrate = 1.0
  batterycalibrate = 1.0
  [encoder0]
  [encoder0]
  rate_pos_ms = 0
  rate_pos_ms = 0
Line 95: Line 99:
  log_enc = true
  log_enc = true
  log_pose = true
  log_pose = true
  [imu1teensy0]
  [imu1teensy0]
  gyro_offset = 0 0 0
  gyro_offset = 0 0 0
Line 102: Line 107:
  rate_gyro_ms = 0
  rate_gyro_ms = 0
  rate_acc_ms = 0
  rate_acc_ms = 0
  [imu2teensy0]
  [imu2teensy0]
  use = false
  use = false
Line 110: Line 116:
  rate_gyro_ms = 0
  rate_gyro_ms = 0
  rate_acc_ms = 0
  rate_acc_ms = 0
  [servotn0]
  [servotn0]
  rate_ms = 0
  rate_ms = 0
  log = true
  log = true
  print = true
  print = true
  [motor_teensy_0]
  [motor_teensy_0]
  m1kp = 7.0
  m1kp = 7.0
Line 134: Line 142:
  rate_motv_ms = 25
  rate_motv_ms = 25
  rate_motpwm_ms = 0
  rate_motpwm_ms = 0
  [velocity0]
  [velocity0]
  enctickperrev = 68
  enctickperrev = 68
Line 140: Line 149:
  log = true
  log = true
  print = false
  print = false
  [current_teensy_0]
  [current_teensy_0]
  log = true
  log = true
  print = false
  print = false
  rate_ms = 10
  rate_ms = 10
  [distforce0]
  [distforce0]
  rate_ird_ms = 0
  rate_ird_ms = 0
Line 150: Line 161:
  print = false
  print = false
  force = false
  force = false
  [gpio]
  [gpio]
  pins_out = 12=0 16=0
  pins_out = 12=0 16=0
Line 157: Line 169:
  print = false
  print = false
  use = false
  use = false
  [mixer]
  [mixer]
  use = true
  use = true
Line 167: Line 180:
  drive_gear = 1
  drive_gear = 1
  wheel_radius = 0.09
  wheel_radius = 0.09
  [joy_logitech]
  [joy_logitech]
  log = true
  log = true
Line 172: Line 186:
  device = /dev/input/js0
  device = /dev/input/js0
  device_type = Logitech Gamepad F710
  device_type = Logitech Gamepad F710
  [joy_use]
  [joy_use]
  log = true
  log = true
Line 185: Line 200:
  servo = 1
  servo = 1
  servoScale = 10
  servoScale = 10
  [ini]
  [ini]
  ; set 'saveconfig' to 'false' to avoid autosave =  
  ; set 'saveconfig' to 'false' to avoid autosave =  
  saveconfig = true
  saveconfig = true
  version = 853 2025-01-05 16:22:46
  version = 853 2025-01-05 16:22:46
  [edge0]
  [edge0]
  log = true
  log = true

Revision as of 09:31, 9 January 2025

Back to Robobot B

Robobot base software

To make the initial copy from the repository (Linux)

cd
mkdir -p svn
cd svn
svn checkout svn://repos.gbar.dtu.dk/jcan/robobot

To update with a new version

cd
cd svn/robobot
svn update

If you want to see the source code on other platforms, the repository is open for reading.

Compile base software

IP display

Go to svn/robobot/ip_disp, the app that handles the display of IP and listens to the start button.

cd ~/svn/robobot/ip_disp
mkdir build
cd build
cmake ..
make -j3

This will be started at reboot

Teensy_interface

Go to ~/svn/robobot/teensy_interface. This app communicates with Teensy and translates to and from MQTT.

cd ~/svn/robobot/teensy_interface
mkdir build
cd build
cmake ..
make -j3

Configure

The Teensy interface is configured using an initialization file robot.ini.

Copy the "factory" settings to the build directory:

cd ~/svn/robobot/teensy_interface
cp robot.ini build/

This file looks like this (svn version 864 of 9 Jan 2025):

[service]
use_robot_hardware = true
logpath = log_%d/
; the '%d' will be replaced with date and timestamp (must end with a '/'). = 
max_logging_minutes = 1000
log_service = true

[mqtt]
broker = tcp://localhost:1883
context = drive
clientid = dot
function = drive/
system = robobot/
log = true
print = false
use = true

[teensy0]
use = true
type = robobot
idx = 124
; robot 'name' and 'idx' are read-only, use command line option to change = 
name = Dot
device = /dev/ttyACM0
log = true
print = false
confirm_timeout = 0.04
encrev = true
hardware = 8

[robot0]
log = true
print = false
regbot_version = 696
shutdown_file = /home/local/shutdown.now
batteryusedwh = 242.503580
batterycalibrate = 1.0

[encoder0]
rate_pos_ms = 0
rate_vel_ms = 15
print = false
encoder_reversed = true
rate_pose_ms = 5
log_enc = true
log_pose = true

[imu1teensy0]
gyro_offset = 0 0 0
log = true
print_gyro = false
print_acc = false
rate_gyro_ms = 0
rate_acc_ms = 0

[imu2teensy0]
use = false
gyro_offset = 0 0 0
log = true
print_gyro = false
print_acc = false
rate_gyro_ms = 0
rate_acc_ms = 0

[servotn0]
rate_ms = 0
log = true
print = true

[motor_teensy_0]
m1kp = 7.0
m1lead = 0 1.0
m1taui = 0.05
m1feedforward = 0
m1maxmotv = 8.0
m1voffset = 0.0
m2kp = 7.0
m2lead = 0 1.0
m2taui = 0.05
m2feedforward = 0
m2maxmotv = 8.0
m2voffset = 0.0
log_voltage = true
m1log_pid = true
m2log_pid = true
m1print = false
m2print = false
rate_motv_ms = 25
rate_motpwm_ms = 0

[velocity0]
enctickperrev = 68
motorscale = 1 1
useteensyvel = true
log = true
print = false

[current_teensy_0]
log = true
print = false
rate_ms = 10

[distforce0]
rate_ird_ms = 0
log_dist = true
log_force = false
print = false
force = false

[gpio]
pins_out = 12=0 16=0
stop_on_stop = true
blink_period_ms = 600
log = true
print = false
use = false

[mixer]
use = true
log = true
print = false
driveleft = 0 0 -1
driveright = 0 1 -1
wheelbase = 0.22
motor_gear = 18
drive_gear = 1
wheel_radius = 0.09

[joy_logitech]
log = true
print = false
device = /dev/input/js0
device_type = Logitech Gamepad F710

[joy_use]
log = true
print = false
drive_control = true
vel_limit = -1.5
vel_axis = 4
turn_limit = 10.0
turn_axis = 3
button_fast = 5
slow_factor = 0.3
axis_servo = 1
servo = 1
servoScale = 10

[ini]
; set 'saveconfig' to 'false' to avoid autosave = 
saveconfig = true
version = 853 2025-01-05 16:22:46

[edge0]
log = true
print = false
rate_liv_ms = 0
rate_livn_ms = 7