sbgisen / vesc

VESC Interface for ROS
Apache License 2.0
47 stars 34 forks source link

Use position and velocity control on vesc #98

Open nyxrobotics opened 2 weeks ago

nyxrobotics commented 2 weeks ago

Abstract

I want to use the PID controller implemented inside the VESC for speed and position control. I remember that in the past there were some parts that changed depending on the version of the firmware, so you need to check carefully. ~I probably needed to copy vesc_packet.cpp and vesc_packet.h from the latest bldc firmware.~ I would like to add this to the README as I vaguely remember it.

Purpose

Implementation Details

nyxrobotics commented 2 weeks ago

https://github.com/sbgisen/vesc/issues/43#issuecomment-1271434529

nyxrobotics commented 2 weeks ago

firmware: datatypes.h vesc_driver: data_map.h

It would be good to have a script that automatically generates this header

nyxrobotics commented 2 weeks ago

Since sending position commands has been implemented, it would be usable if the home position adjustment function is implemented. I think the origin alignment function needs to send a command to vesc to set the current position.

https://github.com/sbgisen/vesc/blob/48bf2853b32254e7214fdb4d0ce1824af00e4f06/vesc_driver/src/vesc_driver.cpp#L243

https://github.com/sbgisen/vesc/blob/48bf2853b32254e7214fdb4d0ce1824af00e4f06/vesc_driver/src/vesc_interface.cpp#L273C21-L273C32

nyxrobotics commented 1 week ago

I will be working on this one in ROS2.