ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

can we assign value to the request variable of srv file other then run time ?

asked 2018-08-21 22:42:39 -0600

rama_bhuyan gravatar image

updated 2018-08-21 22:45:06 -0600

with an example,


int64 a

int64 b

int64 sum


srv.request.a =atoll(argv[1]);

srv. request.b =atoll(argv[2]);

/* which takes the value during run time */

can I assign the value of a and b during writing of the code? pre assign of the value to the variable ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-22 01:31:01 -0600

ahendrix gravatar image

Yes. Like any other variable, you can assign any value to the service request parameters. (could come from user input, a file, or just a pre-assigned value).

edit flag offensive delete link more

Question Tools



Asked: 2018-08-21 22:42:39 -0600

Seen: 119 times

Last updated: Aug 22 '18