ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to call the service "ardrone/setgpstarget"

asked 2015-10-15 05:54:02 -0600

JCUAV gravatar image

updated 2015-10-15 06:22:50 -0600

Could anyone give me an example of how to call this service? I know it is one of the TODO things for the GPS branch but I don't know how to call it. The structure is this:

geographic_msgs/WayPoint target
     uuid_msgs/UniqueID id
           uint8[16] uuid
     geographic_msgs/GeoPoint position
            float64 latitude
            float64 longitude
            float64 altitude
     geographic_msgs/KeyValue[] props
            string key
            string value
bool result

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-15 16:26:57 -0600

Mani gravatar image

updated 2015-10-15 16:28:33 -0600

You can use rqt_service_caller GUI for quickly testing this service. Run that with rosrun rqt_service_caller rqt_service_caller from a terminal in which you've already sourced ardrone_autonomy's workspace. Give the waypoint a unique ID, then set latitude, longitude and altitude values. Finally call the service.

KeyValye[] props list is used to set velocity and target orientation for the waypoint. I never managed to set those using this GUI (or command line). However the default values (0.5 m/s and 0) should work fine. If you want finer control, you can call this service from a Python script.

To enable/disable the autonomous flying after setting the waypoint, call ardrone/setautoflight service with enable=true/false.

edit flag offensive delete link more


I did what you recommended me above and now I have a few doubts: 1. I don't understand the result structure when calling the service: Set GPS WayPoint "10000,0,0,0,0,500,500,525000,0,0" 2. I want to know how to call this service with the command line. I have been trying but I don't succeed.

JCUAV gravatar image JCUAV  ( 2015-10-16 09:29:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-10-15 05:54:02 -0600

Seen: 357 times

Last updated: Oct 15 '15