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

How to create a waypoint in a simulation generated with the tum_simulator package

asked 2015-10-17 15:32:21 -0500

Pickman gravatar image

The tum_simulator package allows to simulate a ardrone in gazebo. I want to create a control package allowing me to set waypoints in this simulation and see the drone moving between them. Possibly also implementing collision avoidance. However I'm facing some difficulties in understanding what's the best approach to this problem. According to the roswiki page ( ) tum_simulator offers the position (published in the /navdata topic). However the /ardrone/navdata topic is of type ardrone_autonomy/Navdata which is:

 std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
float32 batteryPercent
uint32 state
int32 magX
int32 magY
int32 magZ
int32 pressure
int32 temp
float32 wind_speed
float32 wind_angle
float32 wind_comp_angle
float32 rotX
float32 rotY
float32 rotZ
int32 altd
float32 vx
float32 vy
float32 vz
float32 ax
float32 ay
float32 az
uint8 motor1
uint8 motor2
uint8 motor3
uint8 motor4
uint32 tags_count
uint32[] tags_type
uint32[] tags_xc
uint32[] tags_yc
uint32[] tags_width
uint32[] tags_height
float32[] tags_orientation
float32[] tags_distance
float32 tm

I can't find the position of the drone. Without it I would have to implement my own odometry evaluation. Am I missing something? Did I somehow install the wrong package or is the wiki page wrong? Do you know if a control package for this simulator is already implemented?

edit retag flag offensive close merge delete


did u solve it? wanna do the same :/

Trinto gravatar image Trinto  ( 2016-07-22 07:34:22 -0500 )edit

@Trinto: could you please post a comment next time for these kinds of things instead of an answer? Otherwise it looks like the question is answered. Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2016-07-22 07:53:32 -0500 )edit

@Trinto I didn't implement so far collision detection or avoidance as this implies adding sensors or a more complex control system interpreting position and velocity changes but I'm working on it. For details on what caused my difficulties in getting the drone's position check my answer below.

Pickman gravatar image Pickman  ( 2016-08-05 19:22:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-05 19:21:36 -0500

Pickman gravatar image

Sorry for not updating, I solved my problem. Turns out that the standard tum_simulator is not compatible with Indigo. I would suggest you to check this repository instead if you're using Indigo (and possibly more recent versions). I was able with some tweaking to create a naif controller that applies a velocity proportional to the distance up to a certain distance where the drone hovers near the point, I'm not yet satisfied with this implementation but that goes beyond the scope of this question.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-10-17 15:27:05 -0500

Seen: 1,313 times

Last updated: Aug 05 '16