Page 6 of 12
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Thu May 22, 2014 5:55 am
by crazyflie007
Hi everyone,
I followed Patrik's tips for setting up the crazyflie using ROS and kinect. However I wasn't able to execute rosmake. It gives the following error:
rosmake crazyflieROS
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['crazyflieROS']
[ rosmake ] Logging to directory /home/prannoy/.ros/rosmake/rosmake_output-20140521-141104
[ rosmake ] Expanded args ['crazyflieROS'] to:
[]
[ rosmake ] WARNING: The following args could not be parsed as stacks or packages: ['crazyflieROS']
[ rosmake ] ERROR: No arguments could be parsed into valid package or stack names.
I'm new to ROS. Could you please help?
Also I think I'm not doing the rosmake part correctly. Could you post specific instructions as to how to do that part, as in which folder to be , etc.?
Prannoy
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Thu May 22, 2014 7:00 am
by Veerachart
crazyflie007 wrote:Hi everyone,
I followed Patrik's tips for setting up the crazyflie using ROS and kinect. However I wasn't able to execute rosmake. It gives the following error:
rosmake crazyflieROS
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['crazyflieROS']
[ rosmake ] Logging to directory /home/prannoy/.ros/rosmake/rosmake_output-20140521-141104
[ rosmake ] Expanded args ['crazyflieROS'] to:
[]
[ rosmake ] WARNING: The following args could not be parsed as stacks or packages: ['crazyflieROS']
[ rosmake ] ERROR: No arguments could be parsed into valid package or stack names.
I'm new to ROS. Could you please help?
Also I think I'm not doing the rosmake part correctly. Could you post specific instructions as to how to do that part, as in which folder to be , etc.?
Prannoy
Hi!
Well, I'm not that used to using rosmake (mostly I've been working more in catkin,) but it seems like the folder crazyflieROS is not in you ROS_PATH_PACKAGE or something like that. If you haven't set up the workspace for ROS, take a look at the
tutorial in ROS website. Else, try
in a terminal and see if it is the same as the directory for crazyflieROS.
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Fri May 23, 2014 11:07 am
by omwdunkley
Yup, I agree with Veerachart!
I should probably catkinize everything - rosbuild was left over from the good old days

)
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Sun May 25, 2014 11:26 pm
by omwdunkley
Hi all,
finally got my kinect out again.
The ps3joy drivers some of you might be using could be wonky, mine were. Was only getting updates around 10 hz.
Fix
I updated the README (screenshots too) and the code to reflect the changes. Note that some of the axes changed, so if you dont follow the update above you might need to play around with
Buttons and Axes. Easiest way to debug: Uncomment this
block, press the buttons/move the axes on your joystick, see which number they were mapped to and replace the Button and Axes mapping
here.
I just ran everything and it worked perfectly the first time

Even with a flie that needs +15° trim for pitch

Let me know if there are any problems.
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Mon May 26, 2014 9:13 am
by Patrik
Wow, thanks for the thorough update of the read me

We'll try it out after our exams. We will also post our report on our project

Re: [Video] Alternative Kinect Control (using depth images)
Posted: Tue May 27, 2014 4:22 pm
by Patrik
Hi!
Tried it out today, worked way better and things get published on cfjoy

But the control doesn't work yet. We've noticed that your tracking works a lot faster in your video and your goal and cf_xyz had the same orientation. Ours is rotated 180 degrees in the xy-plane in respect to each other. Also we've updated the code but don't get the utilization option under log.
Patrik
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Tue May 27, 2014 4:31 pm
by omwdunkley
Glad things are working out
/goal and /cf_xyz are independent. It doesnt matter how they are. Goal is where we want the flie to be, so we can rotate it to achieve yaw (assuming tracking & PID work

)
To get utilization you need to update the crazyflie firmware (see the top of the readme) and log it (from the log tab, eg @ 10hz).
What do you mean the control doesnt work? Cant help unless I know more

Make sure the yaw is aligned correctly (see the readme picture).
Good luck

Re: [Video] Alternative Kinect Control (using depth images)
Posted: Thu May 29, 2014 3:16 am
by Veerachart
I think I've found the cause that made the flie went away at full thrust.
(I haven't updated the code to the current version, but that should not be the problem
From this
line (not sure if it is the same or not, as I got from the joyManager branch), the PID controller is reset each time the automatic mode button is pressed (previously not in hover, but now entering hover mode.) However, my fake joy publisher just publish like the automatic mode button is always pressed, and therefore the PID controller is never reset. The time also keeps counting and therefore causes the integral part grows large.
I'll try changing my publisher.
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Thu May 29, 2014 10:02 am
by Patrik
I followed the link in the readme Oliver, it directs me to the 2014.01.0 version of the firmware, which we already have installed. Should we install one of the other branches instead?
The problem with the automatic control is that the control program doesn't guide the flie towards the goal but rather some arbitrary direction. And the tracking is severely lagging behind compared to the tracking in your video.
Patrik
Re: [Video] Alternative Kinect Control (using depth images)
Posted: Thu May 29, 2014 7:52 pm
by omwdunkley
Veerachart wrote:I think I've found the cause that made the flie went away at full thrust.
(I haven't updated the code to the current version, but that should not be the problem
From this
line (not sure if it is the same or not, as I got from the joyManager branch), the PID controller is reset each time the automatic mode button is pressed (previously not in hover, but now entering hover mode.) However, my fake joy publisher just publish like the automatic mode button is always pressed, and therefore the PID controller is never reset. The time also keeps counting and therefore causes the integral part grows large.
I'll try changing my publisher.
Makes sense

I find it useful to always plot stuff, eg the PID values. ROS makes this quite easy, check out
rqt_plot.
Patrik wrote:I followed the link in the readme Oliver, it directs me to the 2014.01.0 version of the firmware, which we already have installed. Should we install one of the other branches instead?
The problem with the automatic control is that the control program doesn't guide the flie towards the goal but rather some arbitrary direction. And the tracking is severely lagging behind compared to the tracking in your video.
Patrik
So right now I updated/merged all branches, from now on just use master.
Youre absolutely right, I had the wrong firmware link the readme. This shouldnt cause any problems, some features might be lost though.
Please use my
fork. Ive updated the readme, sorry about that. Too much coding at 5am...
To be honest, I never tested the performance of the tracking code. I guess writing in C++ might give speeds up. I didnt really write it with performance in mind; it is not doing anything that complicated. I just use the depth images and not the point cloud, so either the code needs optimising, porting to c, or something fishy is going on

If its too slow tracking wont work...pid control over position and such a dynamic object at 30hz with large lag is pretty much impossible without fusing in more sensor data, compensating for lag, etc. Im running it on an i5 here, it does show increased usage but doesnt come close to the limits. What are you running it on? Try turning off some of the rviz stuff, see where the resources are going to. You can install and use
rqt_top.
Arbitrary direction..doesnt sound good. Are you sure you correctly aligned the flie yaw and the kinect? Not sure what else could be going on - it works perfectly here :/