modifying multiranger_push.py

Firmware/software/electronics/mechanics
Post Reply
nanobot9000
Beginner
Posts: 25
Joined: Mon Apr 11, 2016 4:33 pm

modifying multiranger_push.py

Post by nanobot9000 » Wed Dec 05, 2018 6:48 pm

I have been tinkering around with my new multiranger and original flowdeck. both of the demo scripts run fine but in the push one, I would like to have it hover higher off the ground. I have been poking around at the different parts of the code, but am new to python. Where can I change the value of how high it hovers? I have a flowdeck v2 on the way, but that should not be the issue. Any guidance appreciated. Thanks!

Mike

arnaud
Bitcraze
Posts: 1827
Joined: Tue Feb 06, 2007 12:36 pm

Re: modifying multiranger_push.py

Post by arnaud » Thu Dec 06, 2018 9:45 am

This example uses the Motion commander that can take a default-height as argument when created: https://github.com/bitcraze/crazyflie-l ... der.py#L62

So creating the motion commander in that way would change the default height (https://github.com/bitcraze/crazyflie-l ... er_push.py):

Code: Select all

        with MotionCommander(scf, default_height=0.8) as motion_commander:

nanobot9000
Beginner
Posts: 25
Joined: Mon Apr 11, 2016 4:33 pm

Re: modifying multiranger_push.py

Post by nanobot9000 » Thu Dec 06, 2018 6:13 pm

Thank you! That is exactly the info I needed. I was looking in the motion commander package and saw the different variables I could call, but was not exactly sure how to do that. I can then apply this principle to other scripts. I am thinking of making a variation of the point cloud where you can fly it but it avoids all obstacles so you don't fly it in to a wall.

Thanks,
Mike

Post Reply