Skip to content
Raffaello Bonghi edited this page Oct 22, 2016 · 4 revisions

When the unav_node start more params are initalized. These can be divided into:

  • Node params
  • Generics params
  • Motor control params

Node params

Form this params you can selected the information about name of the serial port or the baud rate. These params are invisibile with this default configuration /dev/ttyUSB0:115200. If you want change this configuration you can add in your rosparam list these lines, example:

/<UNAV_PATH>/serial_port: /dev/ttyUSB0
/<UNAV_PATH>/serial_rate: 115200

If you want change the frequency of the control or diagnostic loop you can add in your ros param list:

/<UNAV_PATH>/control_frequency: 50.0
/<UNAV_PATH>/diagnostic_frequency: 5.0

If the configuration is well written you can read the new configuration when the node start:

[ INFO] [1477140927.696952784]: Control:50Hz - Diagnostic:5Hz

Generics params

With this param you can define the Input/output configuration of the uNav port. This array list all type of ports with this information:

  • 0 for OUTPUT level
  • 1 for INPUT level
/<UNAV_PATH>/gpio: [ 1, 1, 1, 1, 0, 1, 1]

These param is invisibile and the unav use the default configuration. Is used only if is available in the rosparam list.

Motor control params

In this param list are collected all joint availables for the unav board.

/<UNAV_PATH>/joint: [joint_0, joint_1]

The node find in the rosparam list all information about the joint with the same name.

Example for the joint_0:

joint_0:
  number: 0
  ratio: 1.0
  rotation: 1
  bridge: {PWM_dead_zone: 0.0, PWM_frequency: 1, h_bridge_enable: 0, 
    current_gain: 1.0, current_offset: 0.0, 
    volt_gain: 1.0, volt_offset: 1.0}
  diagnostic:
    current: {warning: 0.0, critical: 0.0, timeout: 100, autorestore: 0}
    temperature: {warning: 0.0, critical: 0.0, timeout: 100, autorestore: 0}
  emergency: {Bridge_off: 2.0, Slope_time: 1.0, Timeout: 100}
  encoder: {CPR: 1, channels: 2, position: 1, z_index: 0}
  limits: {position: 6.28, velocity: 5.0, effort: 2.0, 
    current: 2147483.647, PWM: 100.0}
  pid:
    current: {Enable: false, Frequency: 1, Kaw: 0.0, Kp: 0.0, Ki: 0.0, Kd: 0.0}
    velocity: {Enable: false, Frequency: 1, Kaw: 0.0, Kp: 0.0, Ki: 0.0, Kd: 0.0}
Clone this wiki locally