Skip to content
christianrauch edited this page May 28, 2016 · 2 revisions

Welcome to the ROS GoPiGo wiki!

To use the ros node for controlling your GoPiGo robot, download and compile the node and the library first. Follow the instructions at https://github.com/ros-gopigo/rosinstall-repo. After your setup and source the workspace, your are ready to run.

To run the gopigo node:

roslaunch ropigo ropigo.launch

If you receive an error like Error writing to GoPiGo (errno 9): Bad file descriptor you may need to install the package i2c-tools and make sure that your user is allowed to access the device file /dev/i2c-1.

For Debian/Ubuntu:

sudo apt install i2c-tools

After the i2c tools are installed, you are able to check if the GoPiGo is connected to your Raspberry Pi:

sudo i2cdetect -y 1

should return:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- 08 -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

Check the access rights for file /dev/i2c-1:

$ ls -al /dev/i2c-1
crw-rw---- 1 root i2c 89, 1 Mai 28 18:03 /dev/i2c-1

Ok, we need to be either user root or in group i2c. You can determine if your user is in this group, if i2c is in the list printed by command groups. If not, add your user by

sudo usermod -a -G i2c $USER

then logout and login again to make the changes happen. groups should now show i2c.

If you run the node again:

roslaunch ropigo ropigo.launch

it should print the GoPiGo firmware and board version:

[ INFO]: GoPiGo Firmware Version: 16
[ INFO]: GoPiGo Board Version: 14
Clone this wiki locally