Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions classifiers/CNN_9010_wAug_160.h5

This file was deleted.

5 changes: 4 additions & 1 deletion launch/rover_gui.launch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
<param name="startsim" value="$(arg startsim)"/>
<param name="gazebo" value="$(arg gazebo)"/>
</group>


<node name="$(anon joy_node)" pkg="joy" type="joy_node" />

<node name="$(anon rqt_rover_gui)" pkg="rqt_gui" type="rqt_gui" args="-s rqt_rover_gui" required="True" output="screen">
<env name="SWARMATHON_APP_ROOT" value="$(env PWD)" />
<env name="GAZEBO_MODEL_PATH" value="$(env PWD)/simulation/models" />
Expand All @@ -31,6 +33,7 @@
- /rosout_agg
- /tf
- /tf_static
- /joy
</rosparam>
</node>
</group >
Expand Down
2 changes: 1 addition & 1 deletion src/rqt_rover_gui/launch/rover_gui.launch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<launch>
<node name="joy_node" pkg="joy" type="joy_node" />
<node name="$(anon joy_node)" pkg="joy" type="joy_node" />

</launch>
53 changes: 0 additions & 53 deletions src/rqt_rover_gui/src/rover_gui_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ namespace rqt_rover_gui
max_info_log_length = 10000;
max_diag_log_length = 10000;

joy_process = NULL;
joystickGripperInterface = NULL;

obstacle_call_count = 0;
Expand Down Expand Up @@ -263,9 +262,6 @@ namespace rqt_rover_gui
ui.all_autonomous_button->setStyleSheet("color: grey; border:2px solid grey; border-radius:12px; padding: 5px;");
ui.all_stop_button->setStyleSheet("color: grey; border:2px solid grey; border-radius:12px; padding: 5px;");

//QString return_msg = startROSJoyNode();
//displayLogMessage(return_msg);

info_log_subscriber = nh.subscribe("/infoLog", 10, &RoverGUIPlugin::infoLogMessageEventHandler, this);
diag_log_subscriber = nh.subscribe("/diagsLog", 10, &RoverGUIPlugin::diagLogMessageEventHandler, this);

Expand All @@ -279,7 +275,6 @@ namespace rqt_rover_gui
ui.map_frame->clear();
clearSimulationButtonEventHandler();
rover_poll_timer->stop();
stopROSJoyNode();
ros::shutdown();
}

Expand Down Expand Up @@ -1452,9 +1447,6 @@ void RoverGUIPlugin::autonomousRadioButtonEventHandler(bool marked)
control_mode_publishers[selected_rover_name].publish(control_mode_msg);
emit sendInfoLogMessage(QString::fromStdString(selected_rover_name)+" changed to autonomous control");

QString return_msg = stopROSJoyNode();
emit sendInfoLogMessage(return_msg);

//Enable all stop button
ui.all_stop_button->setEnabled(true);
ui.all_stop_button->setStyleSheet("color: white; border:2px solid white; border-radius:12px; padding: 5px;");
Expand Down Expand Up @@ -1498,9 +1490,6 @@ void RoverGUIPlugin::joystickRadioButtonEventHandler(bool marked)
control_mode_publishers[selected_rover_name].publish(control_mode_msg);
emit sendInfoLogMessage(QString::fromStdString(selected_rover_name)+" changed to joystick control");\

QString return_msg = startROSJoyNode();
emit sendInfoLogMessage(return_msg);

//Enable all autonomous button
ui.all_autonomous_button->setEnabled(true);
ui.all_autonomous_button->setStyleSheet("color: white; border:2px solid white; border-radius:12px; padding: 5px;");
Expand Down Expand Up @@ -2327,48 +2316,6 @@ void RoverGUIPlugin::visualizeSimulationButtonEventHandler()

}

QString RoverGUIPlugin::startROSJoyNode()
{
if (!joy_process)
{

QString argument = "rosrun joy joy_node";

joy_process = new QProcess();

joy_process->start("sh", QStringList() << "-c" << argument);

// joy_process->waitForStarted();

return "Started the joystick node.";

}
else
{
return "The joystick node is already running.";
}
}

QString RoverGUIPlugin::stopROSJoyNode()
{
//return "Do nothing for debug";

if (joy_process)
{
joy_process->terminate();
joy_process->waitForFinished();
delete joy_process;
joy_process = NULL;

return "Stopped the running joystick node.";

}
else
{
return "Tried to stop the joystick node but it isn't running.";
}
}

QString RoverGUIPlugin::addUniformTargets()
{
QString number_of_tags = ui.number_of_tags_combobox->currentText();
Expand Down
2 changes: 2 additions & 0 deletions src/swarmie/launch/swarmie.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
<rosparam param="ignore_topics">
- /tf
- /tf_static
- /joy
- /joy/set_feedback
</rosparam>
</node>

Expand Down