Multiranger

Discussions about all things Bitcraze
Post Reply
Typh
Beginner
Posts: 2
Joined: Tue Dec 24, 2019 8:14 am

Multiranger

Post by Typh » Sun Jan 19, 2020 8:55 pm

Hi,

I would like to move my UAV from point (0.0.0) to point (1.0.1.0). Then from point (1.0,1.0) to point (2.0,1.0) by inserting a multi-ranger in case there is an obstacle between the different positions. However, I can't find a command that allows me to do both actions at the same time. Can someone help me?

Thank you very much and have a nice day. :D :D :D :D :D



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

Re: Multiranger

Post by arnaud » Mon Jan 20, 2020 9:28 am

Hi,

The Crazyflie has no collision avoidance algorithms so you will have to implement this part.

One way to go is to send high-level-commander goto set-points using the function cf.high_level_commander.go_to() (you can see it used in this example: https://github.com/bitcraze/crazyflie-l ... #L110-L130). This function returns directly so it will let you observe the multi-ranger readings while the Crazyflie is moving. If you detect an obstacle, you can change the trajectory of the Crazyflie by sending a new go_to setpoint. The algorithms used by the go_to will make a trajectory that starts from the current position and velocity and end at 0 velocity on the requested position, so this means that it allows you to smoothly change trajectory mid-way.

The way to generates the setpoints are up to your use-case. It might be possible to use a potential field approach or simply stop when you see an obstacle and use a simple state machine to run around the obstacle.

Post Reply