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

Using services. calling service.

asked 2012-01-26 20:51:30 -0600

Maurizio88 gravatar image

hi, I want to call a service from node cpp file. is it possible?

I want to create my own node and use a service from another package. what is the aim of ros::service::call?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2012-01-26 20:52:57 -0600

Lorenz gravatar image

Have a look at this tutorial.

edit flag offensive delete link more

Comments

thanks, but i need at least one example!
Maurizio88 gravatar image Maurizio88  ( 2012-02-09 01:24:47 -0600 )edit
The tutorial contains an example showing how to call a service with a service proxy. Look at 1.2 Writing the Client Node. If you really need to use ros::service::call, replace the client.call(srv) by ros::service::call("add_two_ints, srv).
Lorenz gravatar image Lorenz  ( 2012-02-09 01:28:47 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-01-26 20:51:30 -0600

Seen: 1,618 times

Last updated: Jan 26 '12