Some queries related to the image and GPIO control


So, I’d like to know if the this image if mainly centered towards the Magni robot? Like will I not be able to use the image for other projects that I want to create by myself? Or is there something that makes it only for the magni robot. I apologize if thats a stupid question, i’m pretty new to ROS and all this.

I also wanted to know what library I should use to control GPIO pins. I’ve seen a few posts where it said that there are 4 pins that are used in the magni robot? I dont really understand that it would be great if someone could elaborate. I tried using pigpio library for GPIO control as im able to control servos without the issue of connected the servo signal wire to the pwm pin on the raspberry pi. So if i could get more info on which GPIO library is recommended to control the pins, that would be great as well.

Thank you :smiley:

I use this image on at least 5 other personal projects that are not a Magni and a couple of those are robots, some are IoT devices. You can use this image on things other than a Magni.

If you enjoy and like the image feel free to donate by ‘buying us a cup of coffee’ here using the donate button where you got the image:

When using Python I prefer and use the RPi.GPIO library.
To use once you have it then in script use ‘import RPi.GPIO as GPIO’

To use the image without a Magni you should use this command once then reboot
sudo systemctl disable magni-base.service

You may see an example using a great many GPIO lines where I stop Magni from running. One file that shows this GPIO lib in use is:

Refer to how to use the Sonar board GPIO lines in the last half of this page.

The Sonar lines disabled give you 10 lines.

Strongly suggest you take advantage of ‘pifi’ and leave that enabled but up to you.

1 Like
  • What is the Sonar Board?
    *By GPIO lines are you referring to the GPIO pins?
    *So RPi.GPIO is the only library for GPIO control? if so, are you guys planning to add more?
    *Can I download the whole pifi thingy onto another sd card that isn’t an ubiquity robot sd card image but maybe say, an ubuntu mate sd card image?

That last one is little important,
Thanks for replying and excuse my noobiness to all this :sweat_smile:

Also if the pifi is installable on other sd card images, could it be installed on Ubuntu 18.04?

Thanks again

The ‘Sonar Board’ is a Magni specific option. I think by default it will be disabled but just go into the file discussed on the link and verify it is not enabled.

The page I discuss shows real pin numbers.

There is some confusion because the Raspberry Pi folks define GPIO lines where a GPIO line is NOT the pin number. Then some GPIO packages use a DIFFERENT pin numbering. You must determine what your own situation is by perhaps toggling a line very slowly and looking at it with a meter or oscilloscope if you have one.

Our image has PiFi already. To load it elsewhere is not something I have an answer for you. I also don’t know if PiFi works on ubuntu 18.04 and you must wait to see if somebody else knows those answers.

We ship a real robot called ‘Magni’. We offer the image which has a HUGE amount of benefit to persons developing using ROS for robots. There are many installed packages but you must remember this is for a product and if it works for you, great but we cannot support non Magni products, there are just far too many experimenters doing their own thing. So have fun and I hope the image gets you started on your projects.


Hi @mahir758,

pifi has not been tested on any of the 18.04 Raspberry Pi images, so I can’t endorse if it will work or not. However, you could try installing it from source