I think all this is possible. I’m working on improving the accuracy of my mower. I currently have error of four inches and now am working on reducing that. Even things like mechanical slop is causing error. The biggest thing is how to control your gigantic machine. Once that is done start bolting on RTK and a navigation system.
All of this sounds like it will work, but the devil is in implementing it. Also since the machine sounds gigantic make sure you have a safety first.
I will definitely share a picture if I have a chance for it.
The machine has an hydraulically based drivetrain + hydraulically steering which are controllable by hydraulic valves by PLC units.
The implementation between this PLC control and “the current PI+Navio setup” can be figured-out later.
Before moving this giant machine on the road/field, I want to create a prototype with a mower or RC-car like you did and let it move to certain waypoints to stop. Can you suggest me pls what I need more then a raspberry pi 3B with Navio2?
I read several of your topics where you mention Arduino Nano was also used, can you maybe create me a list of hardware and software that I need to order?
I want to know what I can order already in order to get this working.
I have set up the raspberry pi with the emlid rasbian image and mounted the navio2 board on top of it.
I don’t have any ROS experience, any help will be really appreciated, Are you maybe willing to share your source code with me just for debug purposes, I am willing to pay for it. I just need a good starting point where I can build onwards.
I did the exact same thing. For small scale I started with a small electric RC, removed the cover and put a layer of Plexiglas and used that to strap everything on. Here is a pic of after a failed test run where to ran full speed and caught air breaking some stuff.
This was before I got the Navio2, you are using it right now so are one step ahead of me at that time. Not a fan at all of the pixhawk. Here is the car I used to get going, I remember it being cheaper so this maybe a bigger car.
Also you’ll need rc transmitter, receiver, batteries, balance charger, and all that good stuff. I would grab a few replacement parts as if you break anything you’ll be waiting on two week shipping. If you have the extra cash buy the RC itself local from someone who has replacement parts. The front steering knuckle broke and since then its been “out of stock” for months on hobby king. Its what you get from buying cheap, disposable RC cars.
Also on the RC transmitter I was caught off guard by how handy it is. I use a 9 channel and having the extra channels to do things are supper handy. So spend the cash on getting a good transmitter/controller. I’m using a Taurus 9XR Pro and have been super happy with it. Channel mixing is super simple.
The Nano won’t be used till you start wanting to interface with your PLCs, if at all. Some of the tractor guys are communicating directly with the PLC and if you are in luck that would be a way cleaner implementation.
Since you aren’t using RTK and just using the GPS you’ll need to realize you’ll get within a few feet of your waypoints, The way ArduPilot does waypoints works well for hobby and aerial vehicles, not so much for my application hence roll my own. I have a feeling you’ll be wanting to do that before its over.
Also before you move to ROS you’ll need to get very comfortable with how everything works together in this setup. ROS is a thick fat layer of complexity if you aren’t familiar with computer, and c++ or python, and especially linux. I have some simple ROS message to interface with Navio2 via the Python interface that I can upload.
@mr337 Thanks for helping me out here, I will try to do some shopping during the week and also order some spare parts. I am familiar with C and (more with) Python. Linux (cli-based) is also no problem at all as I use this for my daily job. The ROS-Navio2 IF upload would be really appreciated. Last night I installed the ardurover on the pi and connect it to my APM planner 2 -app on my Mac. I will keep you updated if there is some more progress.
other topic: I was just thinking if Reach (the complete RTK package) could be a good alternative to have RTK based precision for my final setup? I saw some pretty amazing precision tests here:
If I have some more time in the weekend I will try to show what kind of machine I meant earlier.
@ruudjantheuws Then sounds like you are in good shape. No offense to anyone, but some people have never used anything other than Microsoft Windows. They haven’t needed to till they start working on smaller embedded stuff. For those it just makes the learning curve that more steep
I’ll let others chime in on the Reach, I’ve been out of the Reach loop for a while and this was before the big 2.0 update.
I’ll try to get the Navio ROS interfaces uploaded, they are VERY simple and only supports a few devices, RC in out etc.
Thanks @mr337 for agreeing to upload some simple ROS interfaces. We are currently using the Navio setup for a mechatronics course where we are just using Python to grab sensor data, RC in, PWM out, etc. I have tinkered some with ROS, and would be very curious to see how well it works with the Navio hardware for some research applications.
Rethinking on this, it is mainly python interfaces, and seriously nothing fancy! IIRC I have RC in and out, and that may just be it I’m working on GPS for the onboard ublox but having issues getting the python GPS example working Python GPS Example Intermittent · Issue #14 · emlid/Navio2 · GitHub.
Anyway it should be enough to see how easy it is to add messages. I’ll get it up on github soon.
IIRC I had to finagle the GPS example Python code to get it to work. Tomorrow I will have my source code handy and can upload what we currently use… In case people want to see a Python code that interfaces with most devices. (Also added a AHRS, but onboard mag calibration has been a pain so we do it offline and just type in the constants).
Still curious on your ROS though. I have gone through all of the tutorials, and have played with the DJI SDK in ROS, but I have not created a functioning ROS code for an embedded system (even if just simple subscriber/publisher creation that would be helpful for me at least).
@mr337 Thanks for uploading the code, Can it be that the current GPSdriver which is written in python is not working out of the box as delivered by emlid-github. The C++ one is working with no problems. I think they just recompiled it from the older navio+, Is this also related with the issue you see on the integration with ROS?
I am about to order some stuff to start doing some prototyping:
The plan is:
1st: learn the basics with the RC-car etc.
2nd: apply more advanced setup together with the RC-used components (+acurators for the steering) to gps control an old landmower I just bought. And also try to get it working on RTK(using RTKLIB) for a better accurancy with Talisman antennas instead of the default navio2 antenna. therefor I am thinking to buy a reach card to act as base-station receiver for RTK.
3rd: Apply the setup on the machine and do first testdrive with Hydrolic-valve control.
For the RC-car I need some advice on ordering the
RC input: I prefer the “Turnigy 9XR PRO Radio Transmitter Mode 1” or Mode 2 (don’t really know the difference). But I don’t know which module to choose and which are even compatible. I read on most topics it is required to have at least 9 channels and also It need to have quite some range right?few km’s.
receiver: Which is compatible/needed with the transmitter which I can preferably reuse for the later phase implementation on my landmower.
Also for ESC I don’t know what tho choose I think I need just 1 right?
Yeah there is something up with it. Yesterday tinkering with it I found out that when a GNSS antenna isn’t hooked up it prints out ~1s interval. It seems to bug out when it has found a GNSS lock. I got to run a strace and post it on the github issue for Emlid.
For your RC Questions:
I think the difference between mode 1 and 2 is which stick returns back to neutral, the left or right. Someone may have to correct me on that.
I run a six channel receiver, a 9 is required for flying vehicles, for the rover 6 has been great.
About the range idk, getting range for aerial and rover based vehicles is different since no obstacles in the air. I ran mine about 1/2km and it was OK. For my application I never went past that, so you’ll have to double check.
The ESC for the RC car was already installed, all that was required was battery and receiver. It is why I went with a almost ready to roll vehicle. In hindsight I should have gone to a local shop and get it all sorted out but it would have been more $$$.
Finally got my Python code uploaded to Github. Here it is. Some pieces work better than others. GPS is in there and does work, but commented out (currently using for indoor coursework). The mag needs to be calibrated for the AHRS to work correctly. Otherwise use .update_imu instead of .update.
Love your work. I have something similar on Pixhawk, (no RTK) and am considering taking the plunge with Navio2/RTK to get better accuracy. I would be a NOOB at using ROS, but writing Python and integrating the components is familiar to me.
Q: Can you clarify your key components that you had to integrate/develop?
Steering: actuator (2) <-> motor controller <-nano-> Navio2 + RPI3
GPS position data: REACH RTK KIT??
Software on RPi: ROS Groovy for RPi – only nmea_navsat_driver?, Raspian?
RC Radio receiver: OrangeRx R615X
Telemetry modem: ??
Video camera: real time USB camera connected to RPi, RPi camera or GoPro-like for post mission review?
Audio/Sound: ??
Interfaces: Motor controller <-> Nano <-> Navio 2 for steering PWM signal? Any others you had to develop?
Ground control: Mission Planner? qGroundControl?
Q: You mentioned in a post you used, “… nmea_navsat_driver all the rest is custom for my requirements. Ardupilot navigation didn’t work like I wanted so had roll my own.” That sounds like you only leveraged ROS to parse NMEA strings and everything else is custom. Is that correct?
Q: Can you clarify your key components that you had to integrate/develop?
Those looks pretty spot on except the telemtry modem is just a simple SIK radio pair. No streaming video, just a gopro knock off. Motor controller is Sabertooh 2x12. Ground control is all custom.
Q: You mentioned in a post you used, “… nmea_navsat_driver all the rest is custom for my requirements. Ardupilot navigation didn’t work like I wanted so had roll my own.” That sounds like you only leveraged ROS to parse NMEA strings and everything else is custom. Is that correct?
Yes, but everything is running in ROS. ROS allows me to build what I need.
I am also beginning the process of building my own autonomous mower. I plan on using a power wheelchair (A jazzy) as the base. Since this is for a yard, I’m expecting less than ideal GPS conditions consistently. I plan to augment the GPS with a Lidar unit. Likely the upcoming Scanse Sweep if they release it soon. Otherwise I’ll build one using the LidarLite. I expect decimeter or less accuracy will suffice initially, but it would be really nice for future aspirations of the project if even better could be achieved. I envision trimming and edging in the (far) future using a few programmable servos or the like with maybe some machine vision type control.
mr337, If I may ask, what RTK base are you using? Are you using the RTKLIB libraries inside of ROS? I am familiar (enough) with linux/python/raspi type setup but ROS is new (to me) and exciting and looks to be more suited to the task.
Also, when creating the navigation package, did you use something as a base or did you do it all completely from scratch? I ask this not really knowing what ROS provides for mapping/etc. I didn’t think I’d really need anything as elaborate as Ardupilot either, and seeing this post kinda confirms that. All I really want is a base I can use to map the whole area and coordinate the sensors, and then break up into areas and calculate the mowing path. It would be nice to have an idea of where to start.
After going through ROS, it is amazing!!! Everything you need to build a base on. How I had not heard of it before baffles me. I will be using this a LOT in the future.
The RTK setup is commercial grade setup, you’ll need to do some research on your requirements and which system you want to use cause it will vary in features and price.