Skip to content

Commit

Permalink
use float for waitForService
Browse files Browse the repository at this point in the history
  • Loading branch information
knorth55 committed Dec 1, 2022
1 parent 3cff147 commit 7a9d7cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions roseus/roseus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,15 +1082,16 @@ pointer ROSEUS_WAIT_FOR_SERVICE(register context *ctx,int n,pointer *argv)
{
isInstalledCheck;
string service;
numunion nu;

ckarg2(1,2);
if (isstring(argv[0])) service = ros::names::resolve((char *)get_string(argv[0]));
else error(E_NOSTRING);

int32_t timeout = -1;
float timeout = -1;

if( n > 1 )
timeout = (int32_t)ckintval(argv[1]);
timeout = ckfltval(argv[1]);

bool bSuccess = service::waitForService(service, ros::Duration(timeout));

Expand Down

0 comments on commit 7a9d7cf

Please sign in to comment.