File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,12 @@ void RoverGUIPlugin::restoreSettings(const qt_gui_cpp::Settings& plugin_settings
249249// Receives messages from the ROS joystick driver and used them to articulate the gripper and drive the rover.
250250void RoverGUIPlugin::joyEventHandler (const sensor_msgs::Joy::ConstPtr& joy_msg)
251251{
252+ // Are we in autonomous mode? If so do not process manual drive and gripper controls.
253+ if ( rover_control_state.count (selected_rover_name) == 2 )
254+ {
255+ return ;
256+ }
257+
252258 // Give the array values some helpful names:
253259 int left_stick_x_axis = 0 ; // Gripper fingers close and open
254260 int left_stick_y_axis = 1 ; // Gripper wrist up and down
@@ -358,7 +364,7 @@ void RoverGUIPlugin::joyEventHandler(const sensor_msgs::Joy::ConstPtr& joy_msg)
358364
359365
360366 joystick_publisher.publish (joy_msg);
361- }
367+ }
362368}
363369
364370void RoverGUIPlugin::EKFEventHandler (const ros::MessageEvent<const nav_msgs::Odometry> &event)
You can’t perform that action at this time.
0 commit comments