UAV haptic control using Novint Falcon - pt 2
Short summary of achieved results:
- All the work done and test for Px4 SITL(jmavsim)
- Mavros is used to talk to pixhawk (or SITL in this case)
- Falcon is not suitable for flying real models (it isn’t reliable enough)
Without further due, here is the video showing the proof of concept in action:
Want to know more about the project? Read on!
All of the work was done using ROS. The diagram below shows main relations between modules.
I had a bit of an issue with making Novint Falcon work with ROS, here are some troubleshooting tips:
- Check if your falcon is connected to power supply (I lost 5 minutes of my life on that once!)
- Remember that there is this issue
- You need C++14 compiler to make libnifalcon work with ROS, make sure you adjust your CMakeLists.txt file
Mavros worked out rather well for me, however there are some things to look out for:
- Px4 needs to be in offboard mode for mavros velocity setpoints to be accepted
- Requests to mavros have to be sent with rate of at least 2Hz
- Messages sent to need a valid timestamp
- Mavros expects velocity setpoints to be in earth referenced, so there is a need for converting from body frame
Unfortunately I won’t be able to test this solution with a real multirotor any time soon. The huge disadvantage that comes with novint falcon is lack of portability (it needs 30V 1A power supply). Also I still don’t have my pixhawk.
The reason I don’t recommend using falcon for real aircraft is that I found it a bit unreliable. Sometimes it seems as if force feedback stops working for a short period of time. If you want to use it with a real aircraft then make sure that you have some safety mode that you can fall back to.
I consider the project finished as a proof of concept. I might commit something more here and there to the github repo but I’m not planning to keep the project fully maintained.
- Implement yaw rotation using digital buttons (lame, I know)
- Implement homing mode on starting program (for offsetting Novint Falcon encoders)
- Programatically establish minimum and maximum values for positions received from Falcon for each axis
- Clean up the code
- Review offb_node.cpp timings (especially refresh rates)
Here you can find the repo with all the code I created. Feel free to fork, and do pull requests!