controller_interface frequency rate
I have been using the ros_control interface to implement a position controller to use both in Simulation (Gazebo) and on a real robot. My implementation inherits from control_base.h and I implement hardware_interface::PositionJointInterface.
My problem is that I would like to know the frequency of the update rate (base class code shown below) such to perform interpolation between desired and target joint positions such to follow a desired velocity.
/// Calls \ref update only if this controller is running.
void updateRequest(const ros::Time& time, const ros::Duration& period)
{
if (state_ == RUNNING)
update(time, period);
}
Is there a method that gives me back the update rate of this function (above). Is it in the Time and Duration variables ? I have so fare failed to find a good tutorial which explains in detail the usage of control_base.h etc.. any pointers would be welcome.
I may be misunderstanding you, but isn't
period
the inverse of what you are asking?yes, it is have just figured it out.. was not use to using ros::time and ros::Duration