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

How do i reset the odometry topic on ardrone_autonomy

asked 2015-06-28 12:21:58 -0500

erivera1802 gravatar image

Hi, Im trying to read the /ardrone/odometry topic, but it is showing me very large values of x and y position Just When it starts. Im am wondering if there is a way to reset the odometry topic so it shows me 0 for the positions on the beginning. Also, the time that it shows is very large, so it has been counting long ago.

Thanks

edit retag flag offensive close merge delete

Comments

I faced the same problem. But I had an workaround. if you subtract the values of x, y and t obtained from the first call back and the subsequent values, you get the values for that session of operation. But I am eager to know if there is an actual way to reset the topic.

Willson Amalraj gravatar image Willson Amalraj  ( 2015-06-29 04:18:29 -0500 )edit

Well, thats a solution, thanks! Just to know, how do you differentiate the first callback from the rest?

erivera1802 gravatar image erivera1802  ( 2015-07-01 16:04:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-01 22:37:50 -0500

Willson Amalraj gravatar image

updated 2015-12-09 04:44:16 -0500

This is what I did.

class xyz{ 
  Private:
    int count;
    double init_x, init_y, init_t;
 public: 
    xyz( ros::NodeHandle &nh){
       count = 0;
       define the callback here
    }
   void callback(...){
       if (count == 0){
          store the values of x, y and t in init_x, init_y and init_t
          count ++;
       }else{
          subtract initial values with the current values
      }
 }}

Update: If you update AR Drone firmware, you can eliminate this problem. There are a few ways to update the firmware. The easiest is thorough the official AR.FreeFlight App by Parrot. The newer versions of this app has an option to update the firmware. Just make sure your phone battery and AR Drone battery is full and click update. First the file will get transferred and after a few drone-turn on-off episodes the green lights will turn on indicating a successful firmware update. Then odometry works properly.

edit flag offensive delete link more

Comments

@erivera1802 Does this solution work?

Mani gravatar image Mani  ( 2015-12-12 15:35:28 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-06-28 12:21:58 -0500

Seen: 423 times

Last updated: Dec 09 '15