28 #ifndef QB_DEVICE_JOINT_LIMITS_RESOURCES_H 29 #define QB_DEVICE_JOINT_LIMITS_RESOURCES_H 79 for (
int i=0; i<joints.
names.size(); i++) {
83 auto urdf_joint = urdf_model.getJoint(joints.
names.at(i));
88 has_limits_ = urdf_has_limits || rosparam_has_limits;
97 else if (has_limits_) {
115 #endif // QB_DEVICE_JOINT_LIMITS_RESOURCES_H A handle used to enforce position and velocity limits of a position-controlled joint.
void initialize(ros::NodeHandle &robot_hw_nh, qb_device_hardware_interface::qbDeviceHWResources &joints, const urdf::Model &urdf_model, hardware_interface::PositionJointInterface &joint_position)
Retrieve the joint limits for each given joint.
bool getSoftJointLimits(const std::string &joint_name, const ros::NodeHandle &nh, SoftJointLimits &soft_limits)
The qbrobotics Device HardWare Resources contains vectors of named joints.
void enforceLimits(const ros::Duration &period)
std::vector< joint_limits_interface::SoftJointLimits > soft_limits
qbDeviceJointLimitsResources()
Do nothing.
virtual ~qbDeviceJointLimitsResources()
Do nothing.
bool getJointLimits(const std::string &joint_name, const ros::NodeHandle &nh, JointLimits &limits)
bool getSoftJointLimits(urdf::JointConstSharedPtr urdf_joint, SoftJointLimits &soft_limits)
void enforceLimits(const ros::Duration &period)
Enforce limits for all managed interfaces.
The qbrobotics Device Joint Limits Resources is a simple class aimed to group all the joint_limits_in...
std::vector< std::string > names
JointHandle getHandle(const std::string &name)
bool getJointLimits(urdf::JointConstSharedPtr urdf_joint, JointLimits &limits)
A handle used to enforce position and velocity limits of a position-controlled joint that does not ha...
std::vector< joint_limits_interface::JointLimits > limits
PositionJointSaturationInterface joint_position_saturation_