@@ -247,18 +247,17 @@ TEST_F(UrDriverTest, reset_rtde_client)
247247
248248TEST_F (UrDriverTest, read_error_code)
249249{
250- g_consume_rtde_packages = true ;
251- g_ur_driver->startPrimaryClientCommunication ();
250+ g_my_robot->ur_driver_ ->startPrimaryClientCommunication ();
252251 // Wait until we actually received a package
253252 std::this_thread::sleep_for (std::chrono::milliseconds (1000 ));
254253 std::stringstream cmd;
255254 cmd << " sec setup():" << std::endl << " protective_stop()" << std::endl << " end" ;
256- EXPECT_TRUE (g_ur_driver ->sendScript (cmd.str ()));
255+ EXPECT_TRUE (g_my_robot-> ur_driver_ ->sendScript (cmd.str ()));
257256
258- auto error_codes = g_ur_driver ->getErrorCodes ();
257+ auto error_codes = g_my_robot-> ur_driver_ ->getErrorCodes ();
259258 while (error_codes.size () == 0 )
260259 {
261- error_codes = g_ur_driver ->getErrorCodes ();
260+ error_codes = g_my_robot-> ur_driver_ ->getErrorCodes ();
262261 }
263262
264263 ASSERT_EQ (error_codes.size (), 1 );
@@ -270,8 +269,8 @@ TEST_F(UrDriverTest, read_error_code)
270269 // Wait for after PSTOP before clearing it
271270 std::this_thread::sleep_for (std::chrono::seconds (6 ));
272271
273- EXPECT_TRUE (g_dashboard_client ->commandCloseSafetyPopup ());
274- EXPECT_TRUE (g_dashboard_client ->commandUnlockProtectiveStop ());
272+ EXPECT_TRUE (g_my_robot-> dashboard_client_ ->commandCloseSafetyPopup ());
273+ EXPECT_TRUE (g_my_robot-> dashboard_client_ ->commandUnlockProtectiveStop ());
275274}
276275
277276// TODO we should add more tests for the UrDriver class.
@@ -296,4 +295,4 @@ int main(int argc, char* argv[])
296295 }
297296
298297 return RUN_ALL_TESTS ();
299- }
298+ }
0 commit comments