Class GravityCompensation
Defined in File gravity_compensation.h
Inheritance Relationships
Base Type
public robot_controllers_interface::Controller
Class Documentation
-
class GravityCompensation : public robot_controllers_interface::Controller
Controller which uses KDL to compute torque needed for static holding of the chain at the current pose.
Public Functions
-
inline GravityCompensation()
-
inline virtual ~GravityCompensation()
Initialize the controller and any required data structures.
- Parameters:
node – Node handle for this controller.
manager – The controller manager instance, this is needed for the controller to get information about joints, etc.
- Returns:
0 if succesfully configured, negative values are error codes.
-
virtual bool start()
Attempt to start the controller. This should be called only by the ControllerManager instance.
- Returns:
True if successfully started, false otherwise.
-
inline virtual bool stop(bool force)
Stop this controller.
- Parameters:
force – If true, this controller will be stopped regardless of return value.
- Returns:
true if controller preempted successfully.
-
inline virtual bool reset()
Cleanly reset the controller to it’s initial state. Some controllers may choose to stop themselves. This is mainly used in the case of the the robot exiting some fault condition.
- Returns:
True if successfully reset, false otherwise.
-
virtual void update(const rclcpp::Time &now, const rclcpp::Duration &dt)
This is the update loop for the controller.
- Parameters:
now – The system time.
dt – The timestep since last call to update.
-
inline virtual std::string getType()
Get the type of this controller.
-
virtual std::vector<std::string> getCommandedNames()
Get the names of joints/controllers which this controller commands.
-
virtual std::vector<std::string> getClaimedNames()
Get the names of joints/controllers which this controller exclusively claims.
-
inline GravityCompensation()