View Single Post
  #6   Spotlight this post!  
Unread 06-04-2016, 08:26
sysdes sysdes is offline
Engineering Mentor
AKA: Maurice Veldhuis
FRC #4678 (CyberCavs)
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2013
Location: Drayton, Ontario
Posts: 9
sysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant futuresysdes has a brilliant future
Re: Help: Raspberry pi and GRIP

Team 4678 was able to use grip on the Rpi 2. To get it working reliably, there were a few key things that needed to be done. We used the Rpi camera because it had almost no lag compared to the USB camera. mjpg-streamer was used to get the stream from the camera. The key here is to use -x 320 -y 240 in the execution of mjpg-streamer to make sure a 320 x 240 image is sent to grip. Sending a 640 x 480 image caused grip to crash and run slow. Also handy for mjpg-streamer was the -rot 90 option which allowed the image to be rotated after we mounted the pi camera at the wrong rotation. When it comes to grip, the 1.3.0 version started every time while the 1.2.0 version started most of the time but was not as reliable. We were able to just copy the 1.3.0 jar file on to the pi as grip.jar and it worked with the grip.project file that we created on the laptop using 1.2.0 and deployed to the pi. mjpg-streamer and grip are started up using systemd. We can provide more details if someone needs them for start on boot. At the competition, in order to work with the FMS, we did need to give the pi a static ip address. It did not seem to be able to use dhcp services to get an address that would allow it to talk to the roborio using network tables. Raspbian Jessie doesn't do static IP like we were used to. It's easiest using the gui through startx then right-click on the network icon to set a static IP. The other method is to edit /etc/dhcpcd.conf. Editing /etc/network/interfaces won't get you to far. We used the static IP 10.46.78.15 and had no problems getting the Rpi to talk to the roborio using the host name roborio-4678-frc.local in the grip configuration.
Reply With Quote