5 ms·
Hey, author here. I used the system described in the link for indoor stabilization of a drone, plus precise landing, to support an automatic battery swap statio
by ashtuchkin 10y ago
Hey, author here. I used the system described in the link for indoor stabilization of a drone, plus precise landing, to support an automatic battery swap station project (have a video there). Worked pretty well, so I decided to open-source it in hopes this would help fellow hackers.
Let me know if you have any questions!
- detaro 10y agoAwesome project, and especially awesome README file: good explanations and images! If I read it right, a way to feed it position data is already integrated in the drone firmware, so you only have to send it the found coordinates and it uses them, correct?
- ashtuchkin 10y agoThanks! Yep, I'm using Mavlink protocol (specifically ATT_POS_MOCAP message) to feed 3d position to the drone autopilot.
- jskopek 10y agoThe hot-swappable drone battery video is cool enough to be its own Shown HN submission. Would it be hard for the drone to be able to seamlessly switch between indoor/lighthouse tracking and outside/GPS tracking? How about the ability for the drone to orchestrate the battery swap autonomously with the charging unit? If you could add those two features you could produce a proof of concept video that would probably blow a lot of minds.
- ashtuchkin 10y agoThanks, that's nice to hear! Seamless switching is definitely doable and shouldn't be hard, just need some time to implement. I'm using PX4 autopilot and it's very friendly for adding new functionality. Orchestration is also close - in current demo both station and drone use Wifi to coordinate, so it's a matter of adding new logic. Currently the most limiting resource for that project is my time :) I'd be happy if other people would want to join!
- CraigJPerry 10y agoDude that video is an amazing demo. I left a comment on YT but you should take this further! P.s. I think the I-term in your pid control loop is too high on your quadcopter, that oscillation isn't really affecting your flight control too badly but it heats the motors more than a stable tune would which reduces the service life of the permanent magnets in them. Could be the P-term but the oscillation looks too slow for that, I guess one way to check for sure (assuming you don't have a blackbox on there) could be to increase your D-term and see what the response is
- ashtuchkin 10y agoThanks, yeah I need to tune it more, just wanted to share sooner :) I do have a blackbox there, that should help.
- RobertLong 10y agoThis is awesome! Curious what your thoughts are on this vs one of the official SteamVR tracking modules[1] which use the TS3633[2]? For $10 this is an awesome hack for off the shelf components. However, for $70 + Shipping you can pick up 10 of the tracking modules which filter out noise and do accurate envelope calculation. [1] https://www.triadsemi.com/product/ts3633-cm1/ https://www.triadsemi.com/product/ts3633-cm1/ [2] https://www.triadsemi.com/product/ts3633/ https://www.triadsemi.com/product/ts3633/
- ashtuchkin 10y agoThanks! I actually haven't seen those, they look pretty good, basically replace the custom schematics I needed to build. The timing calculation still needs to be done somewhere though, I wish there was a module that would do it internally and just publish the timing numbers - that would be more scalable and then even Arduino would be able to handle several sensors.
- RobertLong 10y agoYeah, you've basically done all the hard work. I just ordered a batch of these to see if I can get it working. I've been wanting to hack on this since they came out. Thanks for the inspiration!
- moron4hire 10y agoFrom what I understand, the official kit includes software for calibrating a specific configuration of sensors in fixed relation to each other and figuring out the timing parameters. Guess I find out for sure tomorrow!
- RossBencina 10y agoI'm not familiar with the SteamVR tracking modules that you linked, however from the link: > The CM1 contains all the circuitry necessary to convert SteamVR Tracking base station infrared light into a digital output that encodes the angle of the sensor from the base station. That implies that it's not a full location tracking solution by itself (angle only). The data sheet[0] doesn't seem to shed any further (ahem) light. Maybe I'm wrong. And I'm certainly interested in learning more. Do you have more details on the SteamVR tracking system? [0] https://www.triadsemi.com/download/16501/ https://www.triadsemi.com/download/16501/
- fest 10y agoDid you have any issues with PX4 interpreting and fusing MOCAP data?
- ashtuchkin 10y agoI needed to make some adjustments and fix some bugs there to make it work. It has the code, but it didn't work great indoor. I'll try to send these changes upstream when I have time. Let me know if you're interested in them - I can explain further.
- fest 10y agoNot really interested in details, just had a similar experience with optical flow implementation and wanted to know if mocap was better ;)
- rebuilder 10y agoVery nice work! Do I understand correctly that a single sensor board as described here will get position, but can't get orientation? If so, how does the drone handle orienting itself correctly to land on the battery swapping station?
- 70jS8h5L 10y agoOnboard accelerometer/gyroscope which is part of the flight controller, most likely.
- ashtuchkin 10y agoYes you're right, only position. I'm using acc/gyro/compass on the drone.
- RossBencina 10y agoHi, I have some questions: > 3d position accuracy: currently ~10mm; less than 2mm possible with additional work. Could you outline what is required to take your solution from 10mm to 2mm accuracy? what factors limit maximum accuracy? Presumably the lighthouse-derived position could be fused with IMU data for better temporal accuracy. Does your drone software do that? Thanks!
- ashtuchkin 10y agoThe geometry calculation is currently approximate, not taking into account that the laser planes have ~3cm offset from center, that's one. Timing precision is probably the next one - microseconds might not be enough and we can measure better. Currently std dev of each position coord in rest is 1.9mm. Fusion with IMU is the next level and is usually done later down the line because it needs to be tuned for particular model. Yes, the drone does that.