Class PantherRobotDriver
Defined in File panther_robot_driver.hpp
Inheritance Relationships
Base Type
public husarion_ugv_hardware_interfaces::RoboteqRobotDriver(Class RoboteqRobotDriver)
Class Documentation
-
class PantherRobotDriver : public husarion_ugv_hardware_interfaces::RoboteqRobotDriver
This class implements the RoboteqRobotDriver for the Panther robot. It defines two Roboteq drivers (front and rear) with two motors each for controlling the left and right wheels.
Public Functions
-
inline PantherRobotDriver(const CANopenSettings &canopen_settings, const DrivetrainSettings &drivetrain_settings, const std::chrono::milliseconds activate_wait_time = std::chrono::milliseconds(1000))
-
~PantherRobotDriver() = default
-
virtual void SendSpeedCommands(const std::vector<float> &speeds) override
Write speed commands to motors.
- Parameters:
speeds – vector of motor speeds in rad/s. The order is: front left, front right, rear left, rear right
- Throws:
std::runtime_error – if invalid vector size, send command fails or CAN error is detected
-
inline virtual void AttemptErrorFlagReset() override
Attempt to clear driver error flags by sending 0 velocity commands to motors. If Roboteq driver faults still exist, the error flag will remain active.
Protected Functions
-
virtual void DefineDrivers()
This method defines driver objects and adds motor drivers for them. It is virtual to allow mocking drivers in tests.
-
inline PantherRobotDriver(const CANopenSettings &canopen_settings, const DrivetrainSettings &drivetrain_settings, const std::chrono::milliseconds activate_wait_time = std::chrono::milliseconds(1000))