Skip to content

Butler-Project/butler-ddsm115-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DDSM115 Driver (ESP UART)

Use this driver to control DDSM115 motors via an external ESP board connected over UART.

Overview

This ROS 2 package provides a node ddsm115_driver_node that communicates with the ESP board using a custom binary protocol.

  • Port: Defaults to /dev/ttyS2 (configurable).
  • Control: Velocity control via /wheel_vel.
  • Feedback: Raw odometry via /raw_odom.
  • Safety: 2.0s command watchdog stops motors if no command is received.

Interface

Parameters

Parameter Type Default Description
device string /dev/ttyS2 Serial port device path

topics

Subscribers

  • /wheel_control (ddsm115_driver/msg/ControlMode)
    • Set driver mode (0: IDLE, 1: POSITION, 2: VELOCITY).
  • /wheel_vel (ddsm115_driver/msg/WheelVel)
    • Target RPM for left and right wheels.
  • /wheel_pos (ddsm115_driver/msg/WheelPos)
    • Target position (degrees) for left and right wheels.

Publishers

  • /raw_odom (ddsm115_driver/msg/RawOdom)
    • Feedback status (RPM, Current, etc.) published at 20Hz.

Usage

Launch

Run the driver using the launch file:

ros2 launch ddsm115_driver ddsm115.launch.py device:=/dev/ttyS2

Manual Control Examples

1. Set Mode to Velocity

ros2 topic pub --once /wheel_control ddsm115_driver/msg/ControlMode "{mode: 2}"
  • 0: IDLE
  • 1: POSITION
  • 2: VELOCITY

2. Send Velocity Command

Send continuous commands (required to satisfy watchdog):

ros2 topic pub -r 10 /wheel_vel ddsm115_driver/msg/WheelVel "{left_rpm: 50, right_rpm: -50}"

3. Stop Motors

ros2 topic pub -r 10 /wheel_vel ddsm115_driver/msg/WheelVel "{left_rpm: 0, right_rpm: 0}"

4. Set Mode to Idle

ros2 topic pub --once /wheel_control ddsm115_driver/msg/ControlMode "{mode: 0}"

5. Monitor Feedback

ros2 topic echo /raw_odom

About

Motor driver for the robot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors