Skip to main content

Configuration

A single YAML file controls all driver settings:

src/studica_control/config/params.yaml
info

Every component defaults to enabled: false. The driver only starts components you explicitly enable, keeping resource usage minimal.

Multi-Instance Support​

These components each support named instances running simultaneously:

ComponentYAML key
Cobracobra
DutyCycleEncoderduty_cycle
DIOdio
Encoderencoder
Servoservo
Sharpsharp
Titantitan
Ultrasonicultrasonic

Add each instance to a sensors array and configure it by name:

ultrasonic:
enabled: true
sensors: ["front_sonar", "rear_sonar"]
front_sonar:
ping: 8
echo: 9
frame_id: "front_sonar_link"
rear_sonar:
ping: 10
echo: 11
frame_id: "rear_sonar_link"

Topics auto-generate from each instance name — e.g. /front_sonar/range and /rear_sonar/range.

Full Example​

A complete params.yaml for a typical differential drive robot:

control_server:
ros__parameters:
titan:
enabled: true
sensors: ["drive", "arm"]
drive:
can_id: 42
motor_freq: 15600
m_0:
encoder_mode: "quadrature"
dist_per_tick: 0.0006830601
m_1:
encoder_mode: "quadrature"
dist_per_tick: 0.0006830601
m_2:
encoder_mode: "quadrature"
dist_per_tick: 0.0006830601
m_3:
encoder_mode: "quadrature"
dist_per_tick: 0.0006830601
arm:
can_id: 43
motor_freq: 15600
m_0:
encoder_mode: "quadrature"
dist_per_tick: 0.0006830601
m_1:
encoder_mode: "absolute"
m_2:
encoder_mode: "quadrature"
dist_per_tick: 0.0006830601
m_3:
encoder_mode: "quadrature"
dist_per_tick: 0.0006830601

imu:
enabled: true
name: "imu"
topic: "imu"
frame_id: "imu_link"

ultrasonic:
enabled: true
sensors: ["front_sonar"]
front_sonar:
ping: 8
echo: 9
frame_id: "front_sonar_link"

servo:
enabled: true
sensors: ["gripper", "wrist", "elbow"]
gripper:
port: 14
type: "standard"
wrist:
port: 15
type: "continuous"
elbow:
port: 16
type: "linear"

power:
battery_count: 1

VMX Channel Reference​

Channel TypeIndex RangeUsed By
DIO0 – 21Encoder (A/B), DIO, Ultrasonic (ping/echo)
PWM0 – 21Servo
Analog Input22 – 25Sharp
Duty Cycle0, 2, 4, 6, 8, 10DutyCycleEncoder