noid_mover_controller.h
Go to the documentation of this file.
1 
3 #ifndef NOID_MOVER_CONTROLLER_H_
4 #define NOID_MOVER_CONTROLLER_H_
5 
6 #include <ros/ros.h>
7 #include <ros/callback_queue.h>
8 
9 #include <geometry_msgs/PoseStamped.h>
10 #include <geometry_msgs/Twist.h>
11 #include <nav_msgs/Odometry.h>
13 
14 #include "noid_lower_controller.h"
15 #include "noid_robot_hardware.h"
16 
17 namespace noid
18 {
19 namespace mover
20 {
21 
22 #define MAX_ACC_X 1.0
23 #define MAX_ACC_Y 1.0
24 #define MAX_ACC_Z 3.0
25 
26 struct pose
27 {
28  float x;
29  float y;
30  float theta;
31 };
32 
34 {
35  public:
38 
39  private:
40  void cmdVelCallback(const geometry_msgs::TwistConstPtr& _cmd_vel);
41  void safetyCheckCallback(const ros::TimerEvent& _event);
42  void calculateOdometry(const ros::TimerEvent& _event);
43  void velocityToWheel(double _linear_x, double _linear_y, double _angular_z, std::vector<int16_t>& _wheel_vel);
44 
47  ros::Time current_time_, last_time_, time_stamp_;
48  ros::Timer odom_timer_, safe_timer_;
51 
52 /*
53  ros::SubscribeOptions base_ops_;
54  ros::CallbackQueue base_queue_;
55  ros::AsyncSpinner base_spinner_;
56 */
57 
58  double vx_, vy_, vth_, x_, y_, th_;
59  double ros_rate_, odom_rate_, safety_rate_, safety_duration_;
60  float k1_,k2_;
62  bool servo_on_;
63  std::vector<std::string> wheel_names_;
64  std::vector<int> aero_index_;
65 
66  boost::mutex base_mtx_;
68 
69 };
70 
71 //typedef std::shared_ptr<NoidMoverController> NoidMoverControllerPtr;
72 
73 } //mover
74 } //noid
75 
76 #endif
std::vector< std::string > wheel_names_
tf::TransformBroadcaster odom_broadcaster_
noid_robot_hardware::NoidRobotHW * hw_


noid_ros_controller
Author(s): Yohei Kakiuchi
autogenerated on Sat Jul 20 2019 03:44:30