This package provides examples for ROS2 Humble users to read data from the Touch Tronix tactile sensor.
Tested on Ubuntu 22.04.
If you haven't installed ROS 2 yet, please follow the official installation guide:
π ROS 2 Installation Tutorial (Ubuntu)
Create your ROS2 workspace (you can change the name if needed):
mkdir -p ~/sensor_ws/src
###2. Add the Package
Place the sensor package under the src folder:
cd ~/sensor_ws/src
###3. Build the Workspace
Go back to your workspace root and build the package:
cd ~/sensor_ws
colcon build --symlink-install
π Run the Code Terminal 1 β Run the Publisher Node
Source the workspace and run the sensor publisher node:
source install/setup.sh
ros2 run sensor_pkg sensor_pub --ros-args --params-file src/sensor_pkg/config/sensor_params.yaml
Terminal 2 β Run the Subscriber Node
Open another terminal, source the workspace again, and run the sensor subscriber node:
source install/setup.sh
ros2 run sensor_pkg sensor_sub
π Example Folder Structure
sensor_ws/
βββ build/
βββ install/
βββ log/
βββ src/
βββ sensor_pkg/
βββ config/
β βββ sensor_params.yaml
βββ launch/
βββ src/
β βββ sensor_pub.cpp
β βββ sensor_sub.cpp
βββ package.xml
βββ CMakeLists.txt
β Tip:
Ensure your tactile sensor is properly connected via USB or serial port before launching.
You can modify parameters (e.g., serial port, baud rate) in config/sensor_params.yaml.
To check your serial device name, run:
ls /dev/tty*
Tested Platform:
β Ubuntu 22.04
β ROS2 Humble Hawksbill
Dependencies:
rclpy
serial
std_msgs
sensor_msgs