sensors

Line-tension sensing: HX711 load cell on hardware, MuJoCo FTS in simulation.

  • Build type: ament_python

  • Version: 0.0.0

  • License: MIT

  • Maintainer(s): nzge

  • Source: src/sensors/

Executables

Command (ros2 run)

Target

ros2 run sensors load_cell_publisher

sensors.load_cell_publisher:main

Launch files

sensor.launch.py

ros2 launch sensors sensor.launch.py

Launch argument

Default

Description

source

hardware

Source: sensors/launch/sensor.launch.py

Parameters & configuration

sensor_params.yaml

Node load_cell_node

Parameter

Default

Type

arduino_port

'/dev/ttyACM0'

str

arduino_baud

9600

int

arduino_timeout_s

0.05

float

tare_on_start

True

bool

tare_samples

20

int

sensor_sign

1.0

float

sensor_line_filter_window

2

int

calibration_offset

0.0

float

calibration_scale

4.8e-05

float

use_moving_average

True

bool

window_size

10

int

publish_frequency

80.0

float

tension_max_threshold

20.0

float

noise_floor

0.1

float

frame_id

'rod_tip_link'

str

target_tension

3.5

float

sim_line_stiffness

220.0

float

sim_line_springlength

0.2

float

sim_line_damping

1.5

float

sim_rod_frame

'rod_tip_link'

str

sim_fish_frame

'fish_link'

str

Full file
# Configuration for the Fishing Arm Load Cell (HX711 via Arduino serial).
load_cell_node:
  ros__parameters:
    # --- Arduino serial (matches project_w_t_controller.ipynb) ---
    arduino_port: "/dev/ttyACM0"
    arduino_baud: 9600
    arduino_timeout_s: 0.05
    tare_on_start: true
    tare_samples: 20
    sensor_sign: 1.0
    sensor_line_filter_window: 2

    # --- Physical calibration ---
    # Used when tare_on_start=false; overwritten by live tare otherwise.
    calibration_offset: 0.0
    # N per raw ADC count. Notebook used 4.8e-5; tune on your rig.
    calibration_scale: 0.000048

    # --- Signal processing ---
    use_moving_average: true
    window_size: 10
    publish_frequency: 80.0

    # --- Safety / operational limits ---
    tension_max_threshold: 20.0
    noise_floor: 0.1

    frame_id: "rod_tip_link"
    target_tension: 3.5

    # --- Simulation stretch model (must match fishing-robot_sim.xml tendon) ---
    sim_line_stiffness: 220.0
    sim_line_springlength: 0.20
    sim_line_damping: 1.5
    sim_rod_frame: "rod_tip_link"
    sim_fish_frame: "fish_link"

Source: sensors/config/sensor_params.yaml

Dependencies

  • Runtime: geometry_msgs interfaces python3-serial rclpy std_msgs tf2_ros

  • Test: ament_copyright ament_flake8 ament_pep257 python3-pytest

Python API

Full module/class/function reference for sensors is generated automatically: