Robot Base provides the fundamental motor control and teleoperation functionality for the AutoSLAM robotic system.
This package contains:
- Motor Control: Hardware abstraction for robot motor control
- Teleoperation: Keyboard-based robot control interface
- Hardware Support: PCA9685 PWM driver interface for servo/motor control
- Subscribes to
cmd_velmessages for robot movement commands - Provides safety timeout to stop motors if no commands received
- Publishes motor status information
- Hardware abstraction for different motor configurations
- Keyboard-based robot control using WASD keys
- Real-time speed adjustment
- Emergency stop functionality
- Intuitive control interface
# Start motor control node
ros2 run robot_base motor_node
# Send movement commands
ros2 topic pub /cmd_vel geometry_msgs/msg/Twist '{linear: {x: 0.5}, angular: {z: 0.0}}'# Start teleop node
ros2 run robot_base teleop_wasd
# Use WASD keys to control robot
# W/S: Forward/Backward
# A/D: Left/Right turns
# Q/Space: Stop# Start motor control with teleop
ros2 launch robot_base bringup.launch.py enable_teleop:=true
# Start motor control only
ros2 launch robot_base bringup.launch.pymax_duty: Maximum duty cycle for motor control (default: 1000)cmd_vel_timeout: Safety timeout in seconds (default: 1.0)publish_status: Enable status publishing (default: true)status_frequency: Status publish rate in Hz (default: 10.0)
linear_scale: Linear velocity scaling factor (default: 1.0)angular_scale: Angular velocity scaling factor (default: 1.0)publish_rate: Command publish rate in Hz (default: 10.0)
/cmd_vel(geometry_msgs/Twist): Velocity commands for robot movement
/motor_status(std_msgs/String): Motor status information (JSON format)
This package is designed to work with:
- autoslam: Main SLAM integration package
- oakd_driver: Camera and sensor data
- map_builder: RTAB-Map SLAM processing
Robot side runs motor control, laptop handles teleoperation and SLAM processing.
Robot runs motor control and SLAM processing, laptop provides teleoperation only.
- Robot platform with motor control capability
- Optional: PCA9685 PWM driver for servo control
- I2C interface for hardware communication
- rclpy
- geometry_msgs
- std_msgs
- Python 3.8+
MIT License