Skip to content

Commit 6a8cbe8

Browse files
committed
assert that protective stop was cleared
1 parent 35058e9 commit 6a8cbe8

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

tests/test_primary_client.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ TEST_F(PrimaryClientTest, test_send_script_blocking_fail_on_robot_errors)
502502
// Impossible movement, will trigger a warning and protective stop
503503
EXPECT_FALSE(client_->sendScriptBlocking("movel(p[10,0,0,0,0,0])"));
504504
// reset the robot
505-
client_->commandUnlockProtectiveStop();
506-
EXPECT_TRUE(client_->sendScriptBlocking("movej([0,0,0,0,0,0])"));
505+
ASSERT_NO_THROW(client_->commandUnlockProtectiveStop());
506+
EXPECT_TRUE(client_->sendScriptBlocking("movej([0.5,-0.5,0.5,0,0,0])"));
507507
}
508508

509509
TEST_F(PrimaryClientTest, test_send_script_blocking_fail_on_bad_script)
@@ -521,14 +521,14 @@ TEST_F(PrimaryClientTest, test_send_script_blocking_fail_on_bad_script)
521521
EXPECT_FALSE(client_->sendScriptBlocking(script_code));
522522
}
523523

524-
// TEST_F(PrimaryClientTest, test_send_script_blocking_ignore_warnings)
525-
// {
526-
// EXPECT_NO_THROW(client_->start());
527-
// EXPECT_NO_THROW(client_->commandPowerOff());
528-
// EXPECT_NO_THROW(client_->commandBrakeRelease());
529-
// // Impossible movement, will trigger an error and protective stop
530-
// EXPECT_TRUE(client_->sendScriptBlocking("movel(p[10,0,0,0,0,0])", "", std::chrono::seconds(1), false));
531-
// }
524+
TEST_F(PrimaryClientTest, test_send_script_blocking_ignore_warnings)
525+
{
526+
EXPECT_NO_THROW(client_->start());
527+
EXPECT_NO_THROW(client_->commandPowerOff());
528+
EXPECT_NO_THROW(client_->commandBrakeRelease());
529+
// Impossible movement, will trigger an error and protective stop
530+
EXPECT_TRUE(client_->sendScriptBlocking("movel(p[10,0,0,0,0,0])", "", std::chrono::seconds(1), false));
531+
}
532532

533533
int main(int argc, char* argv[])
534534
{

0 commit comments

Comments
 (0)