Skip to content

Commit d2ba571

Browse files
committed
Re-Enable starting up the robot
That was commented out for local testing and should never have ended up in the PR.
1 parent 38543e6 commit d2ba571

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

examples/instruction_executor.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -69,39 +69,39 @@ int main(int argc, char* argv[])
6969
// Making the robot ready for the program by:
7070
// Connect the robot Dashboard
7171
g_my_dashboard.reset(new urcl::DashboardClient(robot_ip));
72-
// if (!g_my_dashboard->connect())
73-
// {
74-
// URCL_LOG_ERROR("Could not connect to dashboard");
75-
// return 1;
76-
// }
77-
//
78-
// // // Stop program, if there is one running
79-
// if (!g_my_dashboard->commandStop())
80-
// {
81-
// URCL_LOG_ERROR("Could not send stop program command");
82-
// return 1;
83-
// }
84-
//
85-
// // Power it off
86-
// if (!g_my_dashboard->commandPowerOff())
87-
// {
88-
// URCL_LOG_ERROR("Could not send Power off command");
89-
// return 1;
90-
// }
91-
//
92-
// // Power it on
93-
// if (!g_my_dashboard->commandPowerOn())
94-
// {
95-
// URCL_LOG_ERROR("Could not send Power on command");
96-
// return 1;
97-
// }
98-
//
99-
// // Release the brakes
100-
// if (!g_my_dashboard->commandBrakeRelease())
101-
// {
102-
// URCL_LOG_ERROR("Could not send BrakeRelease command");
103-
// return 1;
104-
// }
72+
if (!g_my_dashboard->connect())
73+
{
74+
URCL_LOG_ERROR("Could not connect to dashboard");
75+
return 1;
76+
}
77+
78+
// // Stop program, if there is one running
79+
if (!g_my_dashboard->commandStop())
80+
{
81+
URCL_LOG_ERROR("Could not send stop program command");
82+
return 1;
83+
}
84+
85+
// Power it off
86+
if (!g_my_dashboard->commandPowerOff())
87+
{
88+
URCL_LOG_ERROR("Could not send Power off command");
89+
return 1;
90+
}
91+
92+
// Power it on
93+
if (!g_my_dashboard->commandPowerOn())
94+
{
95+
URCL_LOG_ERROR("Could not send Power on command");
96+
return 1;
97+
}
98+
99+
// Release the brakes
100+
if (!g_my_dashboard->commandBrakeRelease())
101+
{
102+
URCL_LOG_ERROR("Could not send BrakeRelease command");
103+
return 1;
104+
}
105105

106106
std::unique_ptr<urcl::ToolCommSetup> tool_comm_setup;
107107
const bool headless = true;

0 commit comments

Comments
 (0)