chiprobotics / chip_bldc_driver

Chip Robotics BLDC ROS Driver
BSD 2-Clause "Simplified" License
8 stars 6 forks source link

Bug in bldc_controller.cpp #1

Open mzahana opened 2 years ago

mzahana commented 2 years ago

Greetings!

There is a bug in bldc_controller.cpp that prevents this driver from being used with multiple drivers, even under different namespaces using the <group> tag. The /bldc_driver_node/Command needs to change to bldc_driver_node/Command. Otherwise, multiple drivers will always receive the same motor command.

Jatin1o1 commented 2 years ago

Greetings!

There is a bug in bldc_controller.cpp that prevents this driver from being used with multiple drivers, even under different namespaces using the <group> tag. The /bldc_driver_node/Command needs to change to bldc_driver_node/Command. Otherwise, multiple drivers will always receive the same motor command.

workaround 1) make a rosparam "topic_name ", set parameter value from launch file, and then make a ros::subscriber to the value of that parameter. 2) make another class within the same namespace and attach another motor to that.

2nd workaround is in my fork of the chip_bldc_driver.