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

how to control the turtlesim_node through "turtlesim/TeleportAbsolution" in my own package

asked 2015-04-25 08:12:36 -0500

leehui gravatar image

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-26 04:46:47 -0500

ahendrix gravatar image

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.

edit flag offensive delete link more

Comments

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

leehui gravatar image leehui  ( 2015-04-27 07:02:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-04-25 08:12:36 -0500

Seen: 741 times

Last updated: Apr 26 '15