18 #ifndef NAOQI_DCM_DRIVER_H 19 #define NAOQI_DCM_DRIVER_H 22 #include <boost/shared_ptr.hpp> 25 #include <qi/session.hpp> 26 #include <qi/anyobject.hpp> 28 #include <qi/anyvalue.hpp> 33 #include <geometry_msgs/Twist.h> 34 #include <sensor_msgs/Imu.h> 35 #include <sensor_msgs/Range.h> 36 #include <sensor_msgs/JointState.h> 37 #include <std_msgs/Float32.h> 54 template<
typename T,
size_t N>
66 Robot(qi::SessionPtr session);
85 bool initializeControllers(
const std::vector <std::string> &joints_names);
94 void controllerLoop();
97 void commandVelocity(
const geometry_msgs::TwistConstPtr &
msg);
100 void publishBaseFootprint(
const ros::Time &ts);
103 std::vector <bool> checkJoints();
109 void publishJointStateFromAlMotion();
115 bool setStiffness(
const float &stiffness);
118 void ignoreMimicJoints(std::vector <std::string> *joints);
121 boost::scoped_ptr <ros::NodeHandle> nhPtr_;
154 std_msgs::Float32 stiffness_;
157 sensor_msgs::JointState joint_states_topic_;
163 std::string session_name_;
169 std::string body_type_;
175 std::string odom_frame_;
184 double controller_freq_;
187 double joint_precision_;
190 qi::SessionPtr _session;
193 std::vector <std::string> motor_groups_;
202 std::vector <std::string> qi_joints_;
205 std::vector <double> qi_commands_;
208 std::vector <std::string> hw_joints_;
211 std::vector <bool> hw_enabled_;
214 std::vector <double> hw_commands_;
217 std::vector <double> hw_angles_;
220 std::vector <double> hw_velocities_;
223 std::vector <double> hw_efforts_;
229 float stiffness_value_;
232 #endif // NAOQI_DCM_DRIVER_H