Saturday, December 27, 2014

Drone Following Project #15: ROS development

I uploaded an early, early version of the ROS package that listens to the device and sends the info to the Drone. You'll notice that the first executable is called 'button_launch'. That's because the first part I want to work with is sending the Drone to TakeOff mode and Landing mode simply from pressing the Arduino button. The full executable will likely look similar though, as this functionality is also included in the full scope of the project. As you can see the use of the new bool message ('/Lakitu/Device/NewState') has helped organize things greatly. I still feel that I can cut down the amount of times State is subscribed to with some clever implementation, but I'm a bit tired for it now. My pseudocode stab is:

...
NCallback(Bool msg){
 ...
 ...
 ...
  r_nustate=msg->data;
}

SCallback(UInt8 msg){
  r_state=msg->data;
}

Subscribe('NewState',1000, NCallback);
if (r_nustate ==true){
   Subscribe('State',1000, SCallback);


switch(r_state):
...


This way we only call on that extra subscriber when we need it, and rely on global memory otherwise. I have kind of PTSD from being really careful about the memory from working the Velodyne HDL-32E, since I was having to transfer a lot of pics and clouds at the same time.

 Once this is all hashed out, I'll begin testing using the special String publisher I made, then maybe the Drone's LEDs, and then finally the Drone actually taking off and landing. You can never be too careful when playing with the Drone indoors, or for an extended amount of time. Then it's on to the glorious world of IMUs.


On the topic of Velodyne, I'll be making my Velodyne code available on Github slowly. It will be a private repo, and it may take a while because I want to document it really well. I'll make an update when it becomes available.

No comments:

Post a Comment