43 : command_(0), loop_count_(0)
65 std::string joint_name;
66 if (!n.
getParam(
"joint", joint_name)) {
std::unique_ptr< realtime_tools::RealtimePublisher< control_msgs::JointControllerState > > controller_state_publisher_
ros::Subscriber sub_command_
void setGains(const double &p, const double &i, const double &d, const double &i_max, const double &i_min, const bool &antiwindup=false)
Set the PID parameters.
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void starting(const ros::Time &time)
This is called from within the realtime thread just before the first call to update.
hardware_interface::JointHandle joint_
double getVelocity() const
Joint Velocity Controller.
void printDebug()
Print debug info to console.
void setCommand(double cmd)
Give set velocity of the joint for next update: revolute (angle) and prismatic (velocity) ...
bool getParam(const std::string &key, std::string &s) const
void update(const ros::Time &time, const ros::Duration &period)
Issues commands to the joint. Should be called at regular intervals.
void setCommandCB(const std_msgs::Float64ConstPtr &msg)
Callback from /command subscriber for setpoint.
JointHandle getHandle(const std::string &name)
void setCommand(double command)
const std::string & getNamespace() const
std::string getJointName()
Get the name of the joint this controller uses.
control_toolbox::Pid pid_controller_
bool init(hardware_interface::EffortJointInterface *robot, const std::string &joint_name, const control_toolbox::Pid &pid)
void getGains(double &p, double &i, double &d, double &i_max, double &i_min)
Get the PID parameters.
~JointVelocityController()
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
std::string getName() const
JointVelocityController()
void getCommand(double &cmd)
Get latest velocity command to the joint: revolute (angle) and prismatic (velocity).