Go to Post As a rookie team member at my first event, i had a great time, the little glitches meaning nothing. - Gluedtothefloor [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 12-18-2016, 06:51 PM
mrosen mrosen is offline
Registered User
FRC #4915
 
Join Date: Dec 2016
Location: Bainbridge Island, WA
Posts: 1
mrosen is an unknown quantity at this point
Re: FRCSim Install - Other Linux Distro

I got it working on Linux Mint 18. Not for the faint of heart, not ready for prime time. Good start though ... maybe in 2017 ? Here's my notes. HTH.


My Environment
I’m Linux Mint 18.
Must have Java8, both the JDK itself and a version of Eclipse that support this. I’m using Neon 4.6.1. I think a lot of my problems might have been avoided had I started with this.
FRCSim on Windows?
Should be feasible but isn’t. The simulator itself is the Gazebo robot simulation environment. To communicate with Gazebo, WPI provides a few plugins. In theory you should just install Gazebo, rebuild the plugins for that version of Gazebo and off you go. In practice, there is no Windows distribution for Gazebo and efforts to build from source failed. The reference for “Install Gazebo on Windows” says “This documentation describes how to set up a workspace for trying to compile Gazebo on Windows. It does not actually work yet.”
FRCSim on Linux
The references above are an incomplete description of how to get FRCSim working on an outdated version of Gazebo (v6) that is no longer available. If you’re running the version of Ubuntu that they have, give it a shot and maybe you’ll get lucky. Otherwise, use it as a guideline. Here’s what I did:
Install Gazebo using ‘apt’
Install the FRC C++ toolchain so that you can rebuild the plugins: https://launchpad.net/~wpilib/+archi...ntu/toolchain/ . this turns out to be not as easy as you would hope (ref: https://www.chiefdelphi.com/forums/s....php?t=141395).
Rebuild the plugins for the version of Gazebo you installed (v7 at this writing) and copy them into the simulation directory
Building WPILibJ / WPILibJSim
When you install the WPILib plugins for Eclipse, you get WPILibJ.jar which is the runtime that works on the Roborio HW. To run in the simulator you need the WPILibJSimulator.jar file which you need to build from source b/c (a) we need to upgrade the references to Gazebo 6 to Gazebo 7 and (b) there are classes missing (they’re in WPILib.jar but not WPILibJSimulator.jar) and we need to add them. Here’s what to do:

Install Gradle. This is what they use to build the library: sudo apt install gradle
Clone the repository (git://github.com/wpilibsuite/allwpilib.git)
cd into the directory it just created “allwpilib” and build it using gradle with the switch to build the simulation library also:
/gradlew build -PmakeSim
Verify the following:
/home/msr/allwpilib/simulation (note the install script and the install_resources dir)
/home/msr/allwpilib/build/install/simulation (plugins for your version of Gazebo)
/home/msr/allwpilib/wpilibj/build/libs (the simulation library itself)

So, now it’s built but we need to install it. Here’s what I do: Get the original zip archive (for Gazebo6) and unzip it into “wpilib/simulation” (which you’ll need to create -- it’s part of their install script). This includes some scripts like “frcsim” and “sim_ds” which you’ll need. But you’ll need to replace the binaries that reference the old version of Gazebo, so copy /home/msr/allwpilib/build/install/simulation into your new simulation directory and overwrite any conflicts.

You’ll also need the models that go into Gazebo. These are referenced from the manual instructions (ref above) and for convenience, here. Put them in the wpilib/simulations directory
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:56 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi