0
$\begingroup$

Rosanswers logo

Hi, all

I learnt from the ros_tutorials wiki page that the turtlesim_node can be controlled by running the following command in shell: "rosservice call /turtle1/teleport_absolute 5 5 0" I have created a package under my catkin workspace. I want to control the turtlesim_node through "turtlesim/TeleportAbsolution", but I do not know how to write the code to call a service I have tried like the " AddTwoInts " service of ros_tutorials wiki page , but it did not work

Please help! thanks!


Originally posted by leehui on ROS Answers with karma: 1 on 2015-04-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The simple answer to this is to follow the ROS service tutorials and adapt the service client example to the service you want to call.

If you're having trouble with that, please post the code for the service client that you tried to write, and we'll try to give a more detailed answer.


Originally posted by ahendrix with karma: 47576 on 2015-04-26

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by leehui on 2015-04-27:
thank you very much! the problem was solved when I study the tutorial about rosservice (roscpp service) It turns out to be my elementary mistake that results to the compiling problem

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.