Skip to content

Add sinusoidal force sensor example node - #2

Merged
mmmarinho merged 2 commits into
jazzyfrom
feature/sinusoidal-force-sensor-example
Aug 16, 2026
Merged

Add sinusoidal force sensor example node#2
mmmarinho merged 2 commits into
jazzyfrom
feature/sinusoidal-force-sensor-example

Conversation

@mmmarinho

Copy link
Copy Markdown
Contributor

Summary

This PR adds a C++ ROS 2 example node that uses sas::ForceSensorServer to publish sinusoidal force/torque readings.

Changes

  • src/examples/sinusoidal_force_sensor.cpp — New example node that:
    • Creates a SinusoidalForceSensorNode extending rclcpp::Node
    • Instantiates sas::ForceSensorServer with topic prefix "sinusoidal_force_sensor"
    • Publishes force/torque readings on a 10 ms timer (100 Hz)
    • Force readings follow a sinusoidal wave with amplitude 2.0
    • Stores the latest force and torque readings locally (force_reading_, torque_reading_)
    • Publishes the sinusoidal value on the force X axis and torque Y axis via send_force_torque()
  • CMakeLists.txt — Added example build target:
    • New add_executable(sinusoidal_force_sensor ...) with proper dependencies
    • Links against sas_force_sensor library, -ldqrobotics, and Eigen3::Eigen
    • Installs the executable to lib/sas_force_sensor

Usage

After building the workspace:

ros2 run sas_force_sensor sinusoidal_force_sensor

This message was created by an AI agent (OpenHands) on behalf of the user.

- Create src/examples/sinusoidal_force_sensor.cpp: a ROS 2 node that
  publishes sinusoidal force/torque readings via sas::ForceSensorServer
- Force readings oscillate with amplitude 2.0 at 100 Hz
- Store latest force and torque readings locally in the node
- Update CMakeLists.txt to build and install the example executable
@mmmarinho mmmarinho self-assigned this Aug 14, 2026

@mmmarinho mmmarinho left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mmmarinho
mmmarinho marked this pull request as ready for review August 15, 2026 20:22
@mmmarinho
mmmarinho merged commit f35441a into jazzy Aug 16, 2026
6 checks passed
@mmmarinho
mmmarinho deleted the feature/sinusoidal-force-sensor-example branch August 16, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants