sbgisen / vesc

VESC Interface for ROS
Apache License 2.0
41 stars 33 forks source link

vesc shows undesirable position on start up when using combined hardware interface #56

Closed jsupratman13 closed 1 year ago

jsupratman13 commented 1 year ago

Abstract

This is what happens when we use vesc_hw_interface with combined hardware interface Screenshot from 2022-12-15 16-04-38

Both wheel joints should be 0.0 on initialization, but the image shows different values.

The problem is probably here https://github.com/sbgisen/vesc/blob/f8d522070c3a44035a2e4a76c029da9296adf1de/vesc_driver/src/vesc_packet.cpp#L282-L287

Static variables are shared between threads which is not ideal for this particular case. We should have independent variables for threads.