feat: VESC CAN driver for dual motors (Issue #644) #647

Closed
sl-jetson wants to merge 0 commits from sl-controls/issue-644-vesc-can-driver into main
Collaborator

Summary

  • Rewrites vesc_driver_node.py to use python-can with SocketCAN (can0) instead of pyvesc UART
  • Two motors: left=ID 61, right=ID 79 with differential drive from /cmd_vel (Twist)
  • Command timeout 1.0s zeros both motors; wheel_separation and wheel_radius params

Changes

  • New VescCanDriver node using python-can Bus interface
  • Differential drive from /cmd_vel (Twist): linear.x + angular.z steering
  • Two motors: left=ID 61, right=ID 79
  • Command timeout 1.0s zeros motors
  • Updated vesc_params.yaml with CAN config
  • Updated launch file (node name: vesc_can_driver, removed serial/pyvesc refs)
  • Added python3-can to package.xml exec_depend

Test plan

  • Verify CAN bus opens on can0 at boot
  • Publish test /cmd_vel and confirm CAN frames sent to IDs 61 and 79
  • Verify differential drive math (linear + angular steering)
  • Let cmd_vel expire >1.0s and confirm both motors zeroed
  • Test KeyboardInterrupt shutdown zeros motors and closes bus

Closes #644

## Summary - Rewrites vesc_driver_node.py to use python-can with SocketCAN (can0) instead of pyvesc UART - Two motors: left=ID 61, right=ID 79 with differential drive from /cmd_vel (Twist) - Command timeout 1.0s zeros both motors; wheel_separation and wheel_radius params ## Changes - New VescCanDriver node using python-can Bus interface - Differential drive from /cmd_vel (Twist): linear.x + angular.z steering - Two motors: left=ID 61, right=ID 79 - Command timeout 1.0s zeros motors - Updated vesc_params.yaml with CAN config - Updated launch file (node name: vesc_can_driver, removed serial/pyvesc refs) - Added python3-can to package.xml exec_depend ## Test plan - [ ] Verify CAN bus opens on can0 at boot - [ ] Publish test /cmd_vel and confirm CAN frames sent to IDs 61 and 79 - [ ] Verify differential drive math (linear + angular steering) - [ ] Let cmd_vel expire >1.0s and confirm both motors zeroed - [ ] Test KeyboardInterrupt shutdown zeros motors and closes bus Closes #644
sl-jetson added 1 commit 2026-03-17 09:49:06 -04:00
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson closed this pull request 2026-03-18 07:54:04 -04:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#647
No description provided.