Skip to content

TouchTronix-Robotics/Touchsensor_ros2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

ROS2 Humble Example β€” Touch Sensor Data Reading

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)


🧩 Prepare Environment

1. Create a Workspace

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

Copy or clone the package here

###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

About

ROS2 example of reading touchsensor data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages