Page 1 of 1

Raspberry PI ROS and remote access

Unread postPosted:Thu Nov 28, 2013 11:03 am
by Jose
Raspberry Pi community has a lot of interesting treats. For those looking forward building a smart robot system this is a good starting point.

ROS is a robot operating system based on linux. With a lot of tools to be used on your robot. I'm hoping to have some time to play more with this and attach it somehow to HCR. Thanks to Jeremy Nicola for providing the image click here to download

There are several ways to upload the image on your SD card, some tools for windows are very helpful. I'm my case, on a Linux box i used this:
Code: Select all
dd if=imageName.img of=/dev/sdX bs=1M; sync

Afterwards, I installed Vinagre on my linux and tightvncserver on RPi.
Code: Select all
 sudo apt-get install tightvncserver

Tested if it was working with
Code: Select all
vncserver :0 -geometry 800x600 -depth 24

Note the first time you run, it will ask you for a password. If you skip this step, the following automatic boot up process won't work.

Then added it to the boot sequence so it automatically starts everytime the RPi boot up.
Code: Select all
sudo su

Then created and added to the file
Code: Select all
 vim /etc/init.d/vncboot 

Code: Select all
# Provides: vncboot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description: Start VNC Server at boot time.

#! /bin/sh
# /etc/init.d/vncboot


export USER HOME

case "$1" in
   echo "Starting VNC Server"
   #Insert your favoured settings for a VNC session
   /usr/bin/vncserver :0 -geometry 800x600 -depth 16 -pixelformat rgb565

   echo "Stopping VNC Server"
   /usr/bin/vncserver -kill :0

   echo "Usage: /etc/init.d/vncboot {start|stop}"
   exit 1

exit 0

Add execution perms to the file by this command:
Code: Select all
chmod 755 /etc/init.d/vncboot

Update sequence
Code: Select all
update-rc.d vncboot defaults

And reboot.

From your Windows machine, run the Tightvnc viewer and input the IP followed by the desktop number. something like ( in our case we are using Desktop 0)
From linux box you would run
Code: Select all

From there on, attach your wireless and your power to your RPi, and you got a Robotic operating system with remote access.

Re: Raspberry PI ROS and remote access

Unread postPosted:Thu Nov 28, 2013 12:48 pm
by Jose
Once you have logged in your ROS system, open up a terminal and run this command
Code: Select all

I'm thinking about trying this on Cubieboard since it has PWM pins and should be quite nice to drive motors around for a robot. I am not sure if raspberry pi is better for this.

Does anything think that a python script to add sensor data to google docs spreadsheet would be a good approach to data logging for sensors and other information?

Any suggestions appretiated