Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
install/
devel/
logs/
build/
Expand Down
59 changes: 23 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Tactigon ROS2 Nodes Installation and Usage Guide

![ROS2 Logo](https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Ros_logo.svg/1920px-Ros_logo.svg.png)
![Tactigon Logo](https://pypi-camo.freetls.fastly.net/90dce08d567e5182bf672f417aded1b75e57b728/68747470733a2f2f617661746172732e67697468756275736572636f6e74656e742e636f6d2f752f36333032303238353f733d32303026763d34)


Welcome to the **Tactigon ROS2 Nodes** guide! This document will help you install and use the Tactigon-based ROS2 packages.

Expand All @@ -13,6 +15,10 @@ Download and install Ubuntu 24.04 LTS from the [official website](https://ubuntu

### 2️⃣ Install ROS2 Jazzy
Follow the official [ROS2 Jazzy Installation Guide](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debians.html) to install ROS2 and its developer tools.
It is also suggested to run the following command after the installation in order to avoid having to source ros2 on each new terminal
```bash
echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
```

---

Expand All @@ -21,8 +27,7 @@ Follow the official [ROS2 Jazzy Installation Guide](https://docs.ros.org/en/jazz
### 1️⃣ Download and Extract Files
Download the compressed file containing the following folders:
```
examples/
tactigon_gear-5.4.0.tar.gz
models/
src/
```
Extract the file into a directory named `ros2_ws`:
Expand All @@ -35,42 +40,24 @@ cd ~/ros2_ws
Your workspace structure should look like this:
```
ros2_ws/
├── examples/
├── tactigon_gear-5.4.0.tar.gz
├── models/
└── src/
├── tactigon_msgs/ # Custom message definitions
└── tactigon_ros/ # Python package with nodes
```

---

## 🔧 Installing Tactigon-Gear Library

### 1️⃣ Create a Virtual Environment
```bash
cd ~/ros2_ws
python3 -m venv ros_venv
source ros_venv/bin/activate
```

### 2️⃣ Install Tactigon-Gear
```bash
pip install tactigon_gear-5.4.0.tar.gz
```

### 3️⃣ Deactivate Virtual Environment
```bash
deactivate
```

---

## 🔨 Building the ROS2 Workspace

### 1️⃣ Install Dependencies
```bash
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -y --skip-keys tactigon-gear
export PIP_BREAK_SYSTEM_PACKAGES=1
sudo apt install python3-pip
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -y
```

### 2️⃣ Build the Workspace
Expand All @@ -82,12 +69,6 @@ colcon build
```bash
source install/setup.bash
```

### 4️⃣ Add Virtual Environment to `PYTHONPATH`
```bash
export PYTHONPATH=$PYTHONPATH:~/ros2_ws/ros_venv/lib/python3.12/site-packages
```

---

## 📦 The `tactigon_msgs` Package
Expand Down Expand Up @@ -122,29 +103,35 @@ float32 gesture_probability
## ▶ Running the Nodes

### 1️⃣ Start the `tactigon_ros` Nodes
#### `tactigon_data` - Publishes Tactigon data
#### `tactigon_data` - Publishes Tactigon data
This node handles the connection with the Tactigon Skin and publishes a message with the current state on the "/tactigon_state" topic.

Before running this node it is neccesary to modify `TSKIN_MAC = "C0:83:35:34:28:38"` with your own Tactigon Skin MAC address.
```bash
ros2 run tactigon_ros tactigon_data
```
#### `tactigon_logger` - Logs sensor data
This node outputs a CSV file with the logged data of the tactigon. Has to be runned in parallel to the tactigon_data node.
```bash
ros2 run tactigon_ros tactigon_logger
```
#### `tactigon_turtlesim_controller` - Controls Turtlesim via gestures
This node is a simple demo. The node maps certain Tactigon gestures to the control inputs of the turtlebot 2D simulation. Note: run this two nodes in different terminals in parallel.
```bash
ros2 run turtlesim turtlesim_node
```
```bash
ros2 run tactigon_ros tactigon_turtlesim_controller
```

### 2️⃣ Check Topics
Verify the nodes are publishing correctly:
At any point you it is possible to verify if the nodes are publishing correctly:
```bash
ros2 topic list
```
Expected output:
```
/tactigon/state
/tactigon/log
/tactigon_state
/turtle1/cmd_vel
```

Expand Down
1 change: 0 additions & 1 deletion install/.colcon_install_layout

This file was deleted.

Empty file removed install/COLCON_IGNORE
Empty file.
Loading