Skip to content

Commit

Permalink
Merge pull request #734 from knorth55/flt-wait-for-service
Browse files Browse the repository at this point in the history
[roseus] use float for waitForService
  • Loading branch information
k-okada committed Jan 24, 2023
2 parents 3ae9dd6 + 7a9d7cf commit d547290
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 d547290

Please sign in to comment.