ROS2 driver for Flipsky FSESC 4.20 Plus (VESC dual ESC) motor control. Replaces hoverboard ESC communication with pyvesc library. Features: - UART serial communication (configurable port/baud) - Dual command modes: duty_cycle (-100 to 100) and RPM setpoint - Telemetry publishing: voltage, current, RPM, temperature, fault codes - Command timeout: auto-zero throttle if no cmd_vel received - Heartbeat-based connection management - Comprehensive error handling and logging Topics: - Subscribe: /cmd_vel (geometry_msgs/Twist) - Publish: /vesc/state (JSON telemetry) - Publish: /vesc/raw_telemetry (debug) Launch: ros2 launch saltybot_vesc_driver vesc_driver.launch.py Config: config/vesc_params.yaml Next phase: Integrate with cmd_vel_mux + safety layer. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
28 lines
866 B
Python
28 lines
866 B
Python
from setuptools import setup
|
|
|
|
package_name = "saltybot_vesc_driver"
|
|
|
|
setup(
|
|
name=package_name,
|
|
version="0.1.0",
|
|
packages=[package_name],
|
|
data_files=[
|
|
("share/ament_index/resource_index/packages", [f"resource/{package_name}"]),
|
|
(f"share/{package_name}", ["package.xml"]),
|
|
(f"share/{package_name}/launch", ["launch/vesc_driver.launch.py"]),
|
|
(f"share/{package_name}/config", ["config/vesc_params.yaml"]),
|
|
],
|
|
install_requires=["setuptools", "pyvesc"],
|
|
zip_safe=True,
|
|
maintainer="sl-controls",
|
|
maintainer_email="sl-controls@saltylab.local",
|
|
description="VESC UART driver for motor control and telemetry",
|
|
license="MIT",
|
|
tests_require=["pytest"],
|
|
entry_points={
|
|
"console_scripts": [
|
|
"vesc_driver_node = saltybot_vesc_driver.vesc_driver_node:main",
|
|
],
|
|
},
|
|
)
|