Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c048c5d
Publish OpenCR pins A0-A5 raw values to /analog_pins
travis-mendoza Apr 16, 2025
d040226
assign copyright of analog pins files to ROBOTIS
travis-mendoza Apr 17, 2025
79479c3
Add error messages and retry logic to check_device_status
travis-mendoza May 12, 2025
32b9853
Fix error handling for IMU calibration failures
travis-mendoza May 12, 2025
206c253
Update check_device_status declaration in header file
travis-mendoza May 12, 2025
8b6cd9e
Increase time between IMU calibration retries
travis-mendoza May 12, 2025
78ad7d0
Add moar cowbell (delay)
travis-mendoza May 12, 2025
28a48c0
Remove error handling and logging from last few commits to declutter
travis-mendoza May 12, 2025
050835f
Address launch file substitution error
travis-mendoza May 12, 2025
e3e7fe7
Sleep 5 seconds after IMU calibration for consistent bringup success
travis-mendoza May 12, 2025
227e36f
Test OpenCR heartbeat before reading device status
travis-mendoza May 14, 2025
888a3a7
Retry motor connection check if device status shows motor not connected
travis-mendoza May 15, 2025
d30d71a
Move motors warning out of for loop
travis-mendoza May 15, 2025
7f530fb
Only show motor warning when motors do not initialize
travis-mendoza May 15, 2025
046bffa
Create and check fw device_ready flag before checking device_status
travis-mendoza May 20, 2025
8cb7065
Slap on a hot messy fix to address bringup segfault
travis-mendoza May 31, 2025
f0179c8
Revert "Slap on a hot messy fix to address bringup segfault"
travis-mendoza May 31, 2025
789b9ef
Separate analog pins update rate from other sensors
travis-mendoza Jun 4, 2025
344bd83
Add pointer and timer for analog pins to header file
travis-mendoza Jun 4, 2025
98ff228
Write ez-turtlebot3 README
travis-mendoza Jun 17, 2025
b87f432
Fix rebuild instructions
travis-mendoza Jun 18, 2025
c299617
Invoke MPPI controller and SMAC Hybrid planner in nav2 burger params
travis-mendoza Jun 19, 2025
41c9ce9
add .vscode to gitignore
travis-mendoza Jul 16, 2025
ac70b2d
Add AGENT.md to work with Sourcegraph Amp
travis-mendoza Jul 16, 2025
807ee21
Comment out duplicate init_read_memory call for analog pins
travis-mendoza Jul 16, 2025
084be22
Checkout turtlebot3.cpp from 'humble' branch for baseline
travis-mendoza Jul 16, 2025
1aec572
Expand memory range in init_read_memory
travis-mendoza Jul 16, 2025
402b765
Replace analog sensors with analog pins
travis-mendoza Jul 16, 2025
898bb8f
Remove sensor_state from tb3_node CMakeLists
travis-mendoza Jul 16, 2025
0f774ae
Specify which analog pins to read
travis-mendoza Aug 25, 2025
7e6ef5c
Change variable types to make Colcon happy
travis-mendoza Aug 26, 2025
7a1a861
Provide default analog_pins parameter at declaration
travis-mendoza Aug 26, 2025
336094c
Add launch parameter to list analog pins to read
travis-mendoza Aug 26, 2025
9147c50
Make use of custom AnalogPin ROS2 msg
travis-mendoza Aug 28, 2025
3209053
Publish temperature and humidity
travis-mendoza Aug 28, 2025
0e27b02
Add debug messages for temperature and humidity
travis-mendoza Aug 28, 2025
c0fd2e8
Remove ROS info log messages used to debug temp and RH
travis-mendoza Aug 29, 2025
881f6c7
Fix copyright
travis-mendoza Aug 29, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ build-*/
*.txt.user
*.gch
/.project

# IDE specific files
.vscode/
23 changes: 23 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# TurtleBot3 ROS 2 Codebase Guide

## Build Commands
- **Build single package**: `colcon build --packages-select turtlebot3_node`
- **Build all**: `colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release`
- **Source workspace**: `source install/setup.bash`
- **Launch robot**: Launching the robot is only possible from the turtlebot's raspberry pi. You, the agentic coding tool, only operate on the codebase from the remote PC. Therefore launching is not something you can do.
- **View analog data**: `ros2 topic echo /analog_pins`

## Architecture
- **Main packages**: `turtlebot3_node` (core driver), `turtlebot3_bringup` (launch files), `turtlebot3_description` (URDF), `turtlebot3_navigation2`, `turtlebot3_teleop`
- **Core class**: `robotis::turtlebot3::TurtleBot3` - main node managing sensors, devices, motors
- **New feature**: Analog pins A0-A5 published to `/analog_pins` topic via `AnalogPins` sensor class
- **Communication**: Uses DynamixelSDKWrapper to read from OpenCR control table addresses 350-360 for analog pins
- **Dependencies**: ROS 2 Humble, Dynamixel SDK, custom OpenCR firmware with analog support

## Code Style
- **Standard**: C++17, follows ROS 2 conventions
- **Naming**: snake_case for variables/functions, PascalCase for classes, namespaces: `robotis::turtlebot3::`
- **Includes**: System includes first, then ROS msgs, then local headers with relative paths
- **Error handling**: try-catch blocks with RCLCPP_ERROR logging
- **Memory**: Smart pointers (std::shared_ptr, std::unique_ptr), RAII patterns
- **Formatting**: 2-space indentation, header guards with full path, Apache 2.0 license headers
57 changes: 26 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
# TurtleBot3
<img src="https://raw.githubusercontent.com/ROBOTIS-GIT/emanual/master/assets/images/platform/turtlebot3/logo_turtlebot3.png" width="300">
# Overview
This is a fork of [ROBOTIS-GIT/turtlebot3](https://github.com/ROBOTIS-GIT/turtlebot3). This `publish-analog-pins` branch extends the `turtlebot3_node` to broadcast data collected by the OpenCR analog pins A0-A5 to a ROS 2 topic `/analog_pins`. The `main` branch is kept in sync with the ROBOTIS repository.

- Active Branches: noetic, humble, jazzy, main(rolling)
- Legacy Branches: *-devel
This repo is part of the larger project [ez-turtlebot3](https://github.com/ez-turtlebot3/ez-turtlebot3), which combines this repo with analog-enabled [OpenCR](https://github.com/ez-turtlebot3/OpenCR) firmware and a [ROS 2 analog processor package](https://github.com/ez-turtlebot3/ez_analog_processor/branches) to read, process, and publish analog data while operating a TurtleBot3.

# Requirements
* [ROS 2 Humble](https://docs.ros.org/en/humble/index.html)
* [Analog-enabled TurtleBot3 ROS 2 OpenCR firmware](https://github.com/ez-turtlebot3/OpenCR)

## Open Source Projects Related to TurtleBot3
- [turtlebot3](https://github.com/ROBOTIS-GIT/turtlebot3)
- [turtlebot3_msgs](https://github.com/ROBOTIS-GIT/turtlebot3_msgs)
- [turtlebot3_simulations](https://github.com/ROBOTIS-GIT/turtlebot3_simulations)
- [turtlebot3_manipulation](https://github.com/ROBOTIS-GIT/turtlebot3_manipulation)
- [turtlebot3_manipulation_simulations](https://github.com/ROBOTIS-GIT/turtlebot3_manipulation_simulations)
- [turtlebot3_applications](https://github.com/ROBOTIS-GIT/turtlebot3_applications)
- [turtlebot3_applications_msgs](https://github.com/ROBOTIS-GIT/turtlebot3_applications_msgs)
- [turtlebot3_machine_learning](https://github.com/ROBOTIS-GIT/turtlebot3_machine_learning)
- [turtlebot3_autorace](https://github.com/ROBOTIS-GIT/turtlebot3_autorace)
- [turtlebot3_home_service_challenge](https://github.com/ROBOTIS-GIT/turtlebot3_home_service_challenge)
- [hls_lfcd_lds_driver](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver)
- [ld08_driver](https://github.com/ROBOTIS-GIT/ld08_driver)
- [open_manipulator](https://github.com/ROBOTIS-GIT/open_manipulator)
- [dynamixel_sdk](https://github.com/ROBOTIS-GIT/DynamixelSDK)
- [OpenCR-Hardware](https://github.com/ROBOTIS-GIT/OpenCR-Hardware)
- [OpenCR](https://github.com/ROBOTIS-GIT/OpenCR)
# Installation
1. If you haven't already, follow the Humble instructions for the [TurtleBot3 SBC setup](https://emanual.robotis.com/docs/en/platform/turtlebot3/sbc_setup/#sbc-setup)
2. Replace the turtlebot3 repo with the analog-enabled fork
* `cd ~/turtlebot3_ws/src`
* `rm -rf turtlebot3`
* `git clone https://github.com/ez-turtlebot3/turtlebot3`
3. Rebuild the turtlebot3_node
* `cd ~/turtlebot3_ws`
* `colcon build --packages-select turtlebot3_node`

## Documentation, Videos, and Community
# Use
1. Launch the TurtleBot with the same bringup command as before
* `ros2 launch turtlebot3_bringup robot.launch.py`
2. View the /analog_pins topic from your remote pc with
* `ros2 topic echo /analog_pins`
3. Optionally, install the [ROS 2 analog processor package](https://github.com/ez-turtlebot3/ez_analog_processor/branches) to process the raw data from `/analog_pins`.
4. Recommendation: view real-time data in plots with [PlotJuggler](https://github.com/facontidavide/PlotJuggler)

### Official Documentation
# ROBOTIS links
## Official Documentation
- ⚙️ **[ROBOTIS DYNAMIXEL](https://dynamixel.com/)**
- 📚 **[ROBOTIS e-Manual for Dynamixel SDK](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/)**
- 📚 **[ROBOTIS e-Manual for TurtleBot3](http://turtlebot3.robotis.com/)**
- 📚 **[ROBOTIS e-Manual for OpenMANIPULATOR-X](https://emanual.robotis.com/docs/en/platform/openmanipulator_x/overview/)**

### Learning Resources
- 🎥 **[ROBOTIS YouTube Channel](https://www.youtube.com/@ROBOTISCHANNEL)**
- 🎥 **[ROBOTIS Open Source YouTube Channel](https://www.youtube.com/@ROBOTISOpenSourceTeam)**
- 🎥 **[ROBOTIS TurtleBot3 YouTube Playlist](https://www.youtube.com/playlist?list=PLRG6WP3c31_XI3wlvHlx2Mp8BYqgqDURU)**
- 🎥 **[ROBOTIS OpenMANIPULATOR YouTube Playlist](https://www.youtube.com/playlist?list=PLRG6WP3c31_WpEsB6_Rdt3KhiopXQlUkb)**

### Community & Support
## Community & Support
- 💬 **[ROBOTIS Community Forum](https://forum.robotis.com/)**
- 💬 **[TurtleBot category from ROS Community](https://discourse.ros.org/c/turtlebot/)**
5 changes: 4 additions & 1 deletion turtlebot3_bringup/launch/robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def generate_launch_description():

IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[ThisLaunchFileDir(), '/turtlebot3_state_publisher.launch.py']),
[os.path.join(
get_package_share_directory('turtlebot3_bringup'),
'launch',
'turtlebot3_state_publisher.launch.py')]),
launch_arguments={'use_sim_time': use_sim_time,
'namespace': namespace}.items(),
),
Expand Down
3 changes: 3 additions & 0 deletions turtlebot3_bringup/param/humble/burger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
illumination: 0
ir: 0
sonar: 0
# Analog pins to read from (0-5). Must match firmware CONNECTED_ANALOG_PINS configuration
analog_pins: [2, 3, 4]

/**:
diff_drive_controller:
ros__parameters:
Expand Down
Loading