RosReflexxesVelocityInterface.h
Go to the documentation of this file.
1 #ifndef ROS_REFLEXXES_VELOCITY_INTERFACE_H
2 #define ROS_REFLEXXES_VELOCITY_INTERFACE_H
3 
4 #include <ros/ros.h>
9 
11 
13 {
14 private:
16  //paramers
17  int n_dim_;
18  double period_;
19  std::vector<double> max_velocities_;
20  std::vector<double> max_acceleration_;
21  std::vector<double> max_jerk_;
22 
28  bool load_parameters(std::string ns);
29 
30 public:
31 
35 
36  /**********************************************
37  * methods implemented for RosReflexxesInterface
38  */
39  bool init(ros::NodeHandle nh) override;
40  void starting(const std::vector<double> &initial_command) override;
41  std::vector<double> update() override; // advance reflexxes and return current velocity
42 
43  std::vector<double> get_target_command() override {
44  return get_target_velocity();
45  };
46 
47  void set_target_command(const std::vector<double> &command) override {
48  set_target_velocity(command);
49  };
50 
51  std::vector<double> get_current_position() override;
52  std::vector<double> get_current_velocity() override;
53  std::vector<double> get_current_acceleration() override;
54 
55  /**********************************************
56  * custom methods
57  */
58 
59  void advance_reflexxes();//advance reflexxes if initialized and position is known
61 
62  std::vector<double> get_target_velocity();
63  double get_period();
65 
66  //setter functions
67  void set_target_velocity(const std::vector<double> &t_vel) override;
68  void set_target_position(const std::vector<double> &t_pos) override {
69  ROS_ERROR("Cannot set position in RosReflexxesVelocityInterface");
70  }
71 };
72 
73 #endif
void set_target_command(const std::vector< double > &command) override
boost::shared_ptr< RMLVelocityOutputParameters > output_params_
void set_target_position(const std::vector< double > &t_pos) override
std::vector< double > update() override
std::vector< double > get_current_acceleration() override
std::vector< double > get_current_position() override
void starting(const std::vector< double > &initial_command) override
std::vector< double > get_target_command() override
void reset_to_previous_state(RMLVelocityInputParameters previous_state)
boost::shared_ptr< RMLVelocityInputParameters > input_params_
RMLVelocityInputParameters get_current_state()
void set_target_velocity(const std::vector< double > &t_vel) override
boost::shared_ptr< ReflexxesAPI > rml_
bool init(ros::NodeHandle nh) override
std::vector< double > get_current_velocity() override
#define ROS_ERROR(...)


ros_reflexxes
Author(s):
autogenerated on Sat Nov 21 2020 03:17:43