Hi everyone, I am having issue with the magni raspberry pi processing speed. I am planning to upgrade it to jetson xavier nx, this will enable better performance for my application which I am currently doing. but the problem I am facing is, how do I change my raspberry pi into jetson? is there any guide or tutorial for this ?
I think the best way to go about it would be to use a Multi ROS system .
Keep the RPI as it is , let it control the motor controllers and the other base hardware .
Keep the Jetson nano connected via a Ethernet to the RPI .
This way you could have some added redundancy .
Porting everything thats already working on the RPI will be a pain-full process without much rewards .
Besides , i dont thing the Jetson nano would sit in the location where the RPI sits
(I dont think there is space there)
PS- I dont have a magni now , i had one about 2 years back and its from memory i am speaking .
@MoffKalast , If the more compute intensive applications like SLAM and Navigation stack could be running on a different more capable SoC such as the Jetson and the RPI is just acting as a controller to manage the base hardware such as the motors , encoders , BMS . This would mean that even if the Jetson were to crash somehow , the RPI would still be up .
With full Gigabit Level Ethernet ports now found on the latest RPI boards , i think latency would be virtually a thing of the past .
I agree there are some uncertianities to manage shutdown and reboot .
Good point with the GPIO extender , yes that would definitely work !
I don’t think this has anything to do with the word redundancy, in fact you’re just adding more failure points so it’s quite the opposite, and it becomes way harder to power down the robot safely.
That’s not an issue if you have one of these, you can mount it anywhere.
Well assuming you can install an OS that has ROS package support (very specific versions of Debian and Ubuntu) and the right kernel for GPIO support, then it should be easy enough to set the rest up. You’d need to install pigpio and clone the required ubiquity repositories from git.
I don’t think anyone’s tried yet though, the Xavier is fairly new and rather pricey.
That doesn’t really help though, it just means that if either of the systems crashes the entire robot stops working, and you also have the cable and networking as a breaking point.
I can confirm to you that the latency is fine as I’ve already worked on such a system (two Pis, each controlling its own MCB, ethernet ROS link between them) and it does work but it brings a lot of headaches with it. I’d really really advise against it unless there is no other option.
@MoffKalast, well it does not have to be just jetson xavier, i am trying to switch into a better processing unit, raspberry pi is unable to properly run my realsense and also lidar navigation.
I agreed on this part here, less is better since its not the same model. creating redundancy will be a headache. i planning to switch out the raspberry pi and completely replacing it
Did anyone manage to switch out raspberry pi to other processing unit ?
I’m wanting to try replacing the RPI with Jetson nano as well,
Can I use this colorful cable to connect the Jetson nano to Magni’s mainboard? where RPI is used to sit, if so, do you have the link for it where I can purchase or the name for it?
Should be possible yes, but make sure to check which pins are which before you turn it on (the cable might not keep the arrangement). Should be easiest to test with a voltmeter and checking which pins are 5V.
It’s called a 40 pin ribbon cable, you should be able to get it cheap on your local amazon site or aliexpress.
Per the comment on total replacement of the Pi with a Jetson Nano I wish to make it very clear that although it is likely possible there are many unknowns with software and certainly the Sonar Board.
We have customers using Jetson Nano as a second processor and both on ROS on a common Ethernet network. The Pi remains as the motor node interface and ROS master.
When I did the rev 5.2 MCB we added 2 more mounting holes and it is no accident that you are able to physically mount a Jetson Nano using the 2 new holes and the 2 existing holes for Pi mount.
We wanted to try to make it easier for users to mount a Jetson Nano in the co-processor sort of configuration using some clever standoff stacking techniques. We also added a 12V jack for a fan and that too was in preparation for use of cooling fan in case Jetson Nano was added as a second processor. We did not have time to work out use of Jetson Nano to totally replace Pi and then the Pi4 came out so there was much less ‘motivation’ to have a total replacement using Jetson Nano.
WARNING to anyone trying to totally replace the Pi with a Jetson Nano.
Take this on only if you are willing to dig in in a big way and be prepared for significant challenges in the software.
Your greatest chance of success is to not be trying to use our Sonar board and to not be trying to directly connect the Jetson Nano 40 pin connector to the MCB.
There is absolutely a possibility of damage to the MCB and/or the Jetson with a direct connect 40-pin cable. So the best and safest first pass at a single CPU Jetson Nano is to have a rev 5.2 or later MCB and only connect a very small subset of lines with the required ones being the serial port using 3.3V 38.4kbaud and taking the place of the Raspberry Pi serial on pins 8 and 10 with of course a ground as well.
Next to be dealt with would be the I2C bus again 3.3v signals and using MCB 40-pin pins where the Pi pins 3 and 5 would be.
After you get all the software to work on ROS on the Jetson Nano (also a big task) only then consider use of Sonar board and the issues with the great many Sonar Lines as well as the sonar driver for ROS.
So I stress again: Yes it is likely possible but it is no small task and take it on if you are quite familiar with coding port tasks and Linux and so on.
ok, it does sounds a lot of work then…,
but then if I decide to try it the way you suggested above, “using Jetson Nano as a second processor controller and both on ROS on a common Ethernet network. The Pi remains as the motor node interface and ROS master.” , it seems more safer to do so on Magni and less stress.
Do you have a connection diagram for this set up? or is it simply just connecting from the Jetson Nano’s ethernet’s port to Raspberry Pi’s ethernet port and then fire up Magni and Jetson Nano at the same time?
And also after that , if I use Jetson’s Jupyter , say “basic motion”, will it be possible to move Magni’s motors?
Nothing is ‘simple’ but here is the ‘correct way’ to deal with a multi cpu dual cpu ROS environment.
I was discussing total removal of the Raspberry Pi but I am now going to talk about the general way a second ROS configuered CPU running Ros Kinetic release can talk to the Magni CPU to do interfacing using ROS topics. This is the PROPER way to use two cpus.
You configure the Jetson Nano to be running ROS Kinetic. This we have done but is involved in itself. So lets assume you configure a Jetson Nano to be running ROS Kinetic.
Next you have to tell that Jetson Nano that the magni is the ROS master.
See the middle of this page: https://learn.ubiquityrobotics.com/workstation_setup
So just like if you were hooking up a laptop to be ‘connected’ to the ROS master running on the Magni cpi you must have network connected (physically using a switch and proper ethernet IP address assignments commonly done in /etc/network/interfaces).
so once you configure the network and from your Jetson Nano whcih lets say is called ‘jetsonnano’ on the network you must get to the point on network where you can do a ‘ping jetsonnano’ from the raspberry pi and you can do a ‘ping ubiquityrobot’ from the jetson nano. (if your robot has network default name of ‘ubiquityrobot’. So this is all 'standard Linux Networking stuff, above ROS.
If you get all that to work then you setup your Jetson Nano .bashrc to set ros variables so ROS knows where the ROS Master is on the network. This would typically be in middle fo that page and look perhaps like this in your .bashrc on the Jetson Nano running ROS kinetic
export ROS_MASTER_URI=http://ubiquityrobot:11311 export ROS_HOSTNAME=$(hostname).local
If and when you get the networking and ROS master setup you would have to be able to verify all is setup by from the Jetson Nano ssh you run this:
And if you can see motor_node and other nodes that show up with this command from the magni then and only then do you have the Jetson Nano setup as recognizing the ROS_MASTER as the magni which is required.
If you get all that going you can publish to ROS topic /cmd_vel using twist messages and make the Magni move.
To read in things like /odom topic you must subscribe and read that topic and any other topics you need to make decisions on movement.
So again, very complex but in fact rather ‘normal’ ROS stuff and you would learn a great deal if you get it all to work.
That is a good starting point, yea just like how my laptop connects to the ROS_MASTER (Magni).
And I will replace that with the Jetson Nano, I will give it a go and hopefully I can get atleast rosnode list to show something…from Magni