1 #ifndef VIRTUALSERVO_HPP     2 #define VIRTUALSERVO_HPP     7 #include "std_msgs/Float64.h"     8 #include "urdf/model.h"    25     VirtualServo(
const urdf::JointConstSharedPtr& joint_shared_ptr,
    26                  const std::string& robot_description);
   108     double steps_to_target_time() 
const;
   115     double steps_to_target_speed() 
const;
   121     void set_servo(
double pos);
   132     std::string servo_name;
   137     std::string ros_namespace;
   172     bool update_received;
   187     ros::Publisher joint_pub;
 void set_target_pos(double servo_target_pos)
Target position to move the servo. 
VirtualServo is used to simulate realistic movement of the servo. 
Definition: VirtualServo.hpp:17
void stop_movement()
Stop the servo from moving. 
bool is_moving() const 
Servo moving true or false. 
bool is_update_received() const 
Getter for update bool. 
double get_max_rad() const 
Maximum angle in radians of the servo. 
void notify_change()
Sets update received to true. 
VirtualServo(const urdf::JointConstSharedPtr &joint_shared_ptr, const std::string &robot_description)
Constructor for VirtualServo. 
double get_current_pos() const 
Get the current position of the servo. 
double get_max_speed() const 
Maximum speed of the servo. 
void set_speed(double servo_speed)
Set servo speed. 
double get_min_rad() const 
Minimum angle in radians of the servo. 
void start_update_thread()
Starts a thread running the private function Update servo and detaches it.