RobotControlMux.h
Go to the documentation of this file.
1 #ifndef ROBOTCONTROLMUX_H_
2 #define ROBOTCONTROLMUX_H_
3 
4 #include <ros/ros.h>
5 #include <geometry_msgs/Twist.h>
6 #include <sensor_msgs/Joy.h>
7 #include <rsm_msgs/OperationMode.h>
8 #include <rsm_msgs/SetOperationMode.h>
9 
13 #define MOVE_THRESH 0.05
14 
15 namespace rsm {
16 
24 public:
36  void publishTopics();
37 
38 private:
47 
50  std::string _cmd_vel_topic;
51  std::string _joystick_topic;
52 
72  geometry_msgs::Twist _autonomy_cmd_vel;
76  geometry_msgs::Twist _teleoperation_cmd_vel;
80  sensor_msgs::Joy _joystick_cmd;
81 
85  void publishCmdVel();
89  void publishOperationMode();
94  void autonomyCmdVelCallback(const geometry_msgs::Twist::ConstPtr& cmd_vel);
100  const geometry_msgs::Twist::ConstPtr& cmd_vel);
105  void joystickCallback(const sensor_msgs::Joy::ConstPtr& joy);
116  bool checkJoystickCommand(const sensor_msgs::Joy::ConstPtr& joy);
117  bool setOperationMode(rsm_msgs::SetOperationMode::Request &req,
118  rsm_msgs::SetOperationMode::Response &res);
119 
120 };
121 
122 } /* namespace rsm */
123 
124 #endif /* ROBOTCONTROLMUX_H_ */
ros::Publisher _cmd_vel_pub
void teleoperationIdleTimerCallback(const ros::TimerEvent &event)
std::string _joystick_topic
ros::ServiceServer _set_operation_mode_service
bool checkJoystickCommand(const sensor_msgs::Joy::ConstPtr &joy)
ros::Publisher _operation_mode_pub
Handles all command velocities and only allows the robot to move at all if no emergency stop is set a...
geometry_msgs::Twist _teleoperation_cmd_vel
double _teleoperation_idle_timer_duration
std::string _teleoperation_cmd_vel_topic
ros::Subscriber _teleoperation_cmd_vel_sub
bool setOperationMode(rsm_msgs::SetOperationMode::Request &req, rsm_msgs::SetOperationMode::Response &res)
ros::NodeHandle _nh
ros::Timer _teleoperation_idle_timer
sensor_msgs::Joy _joystick_cmd
Definition: BaseState.h:8
void joystickCallback(const sensor_msgs::Joy::ConstPtr &joy)
void teleoperationCmdVelCallback(const geometry_msgs::Twist::ConstPtr &cmd_vel)
void autonomyCmdVelCallback(const geometry_msgs::Twist::ConstPtr &cmd_vel)
ros::Subscriber _autonomy_cmd_vel_sub
std::string _cmd_vel_topic
std::string _autonomy_operation_cmd_vel_topic
ros::Subscriber _joystick_sub
geometry_msgs::Twist _autonomy_cmd_vel


rsm_core
Author(s): Marco Steinbrink
autogenerated on Tue Mar 16 2021 02:44:31