Timing for FRCSIM 2017?

A couple of FRCSIM questions:

  1. The Virtual KOP page says the 2017 field models for Gazebo are “coming soon”. Does anyone know an approximate date?
  2. Gazebo v8 is supposed to have a Windows version. Are there plans to release windows-savvy components/instructions during this build season?

Thanks!
-Greg

I’m in the same boat here. We can make progress for a while on a flat field, but will need the full field (or at least subsets of it) to make progress after that…

Thanks,
Scott

Any update on when the 2017 world file will be released? Or will it not be available this year?

They changed the language on the KOP page. It now reads:

Instructions are also available for importing a 2017 field model and exporting robot models from Solidworks to use with the simulation environment.

I created a very poor version of the field using the Solidworks URDF exporter. I’m not certain the dimensions are accurate (I used the Solidworks field model, but I’m not sure if that has been updated with some of the rule clarifications that have been made).

I am not a CAD guy, so I barely know what I’m doing, and this is recognizably poor quality. But it seems to be working for us.

You can download my poor field here:

https://drive.google.com/file/d/0BzimWl2mvOE3NHlXLW44U1plMTg/view?usp=sharing

Cheers,

Jeremy

Thanks for posting this Jeremy! I am sure this helps several teams. I was able to insert (and drive) PacGoat in this world. For some reason GearsBot is not happy in this world (for me), but this world is a good start.

In other news, I started playing with Gazebo 8 (still on Linux). The latest release Gazebo roadmap shows Windows support in v9, so I setup a new VM with Ubuntu 16.04 (Xenial), Gazebo 8, Eclipse Neon, JDK 1.8, and WPILIB 2017. I did recompile the simulation tools so they will work with Gazebo 8. I got GearsBot to work with Java, but I ran into issues with C++ (which is unfortunate since this is what my team wants to use). I will make another post with some details/gotcha of my installation.

Thanks! I’ll try it out.

This might be a little off topic, but has anyone used one of these simulators for practice and seen an appreciable increase in real driving performance? I’m a little skeptical about it’s usefulness.

My hope for it was to test autonomous code. Even though it will not exactly map 1:1 with the real world, it should give the programmers a place to test concepts before having a physical robot to test on.

Of course, that also assumes the code is ready…and that you have a robot model that is somewhat close to real world proportions.

-Greg

I was able to get Gazebo 8 to run on Ubuntu 16.04, Java JDK 1.8, WPILIB 2017, and Eclipse Neon.2. I did have to rebuild the WPI Simulation tools, which was pretty easy thanks to other recent CD posts.

At one point I thought Gazebo 8 was supposed to support Windows. The Gazebo roadmap now shows Windows support for v9, so better luck next year?

I got the GearsBot example code to run on Java. I had issues getting C++ to run (details on that below).

Here are the boring installation details.
[ul]
[li]Create new VM with Ubuntu 16.04 (Xenial, LTS)
[/li][LIST]
[li]I had to make a setting change to fix a Gazebo issue with VMware:
[/li][li]$ echo “export SVGA_VGPU10=0” >> ~/.bashrc
[/li][/ul]
[li]Install openjdk-8-jdk
[/li][ul]
[li]sudo apt-get install openjdk-8-jdk
[/li][li]My first attempt to use OpenJDK 9 did not work. I did not try too hard to figure out why.
[/li][/ul]
[li]Install Eclipse using 64-bit installer
[/li][ul]
[li]http://www.eclipse.org/downloads/eclipse-packages/?osType=linux&release=undefined
[/li][/ul]
[li]Setup WPILIB plugins (https://wpilib.screenstepslive.com/s/4485/m/13503/l/599679-installing-eclipse-c-java)
[/li][li]Install simulation tools
[/li][ul]
[li]Even though we are rebuilding the tools, it may have other important stuff.
[/li][li]http://first.wpi.edu/FRC/roborio/maven/release/edu/wpi/first/wpilib/simulation/simulation/
[/li][li]I installed 2017.2.1, but 2017.3.1 is now available.
[/li][li]Unzip and place in ~/wpilib/simulation
[/li][/ul]
[li]Download WPILIB source
[/li][ul]
[li]Instructions courtesy of https://www.chiefdelphi.com/forums/showpost.php?p=1642328&postcount=7
[/li]

[li]NOTE: v2017.3.1 was recently released with a Team Update.
[/li]
[/ul]
[li]Build and install the simulation tools
[/li][ul]
[li]Instructions courtesy of https://www.chiefdelphi.com/forums/showpost.php?p=1628037&postcount=10
[/li]

[li]Also copy build/install/simulation/lib/libwplibcSim.so to ~/wpilibsimuation/lib
[/li][li]Rebuild gz_msgs (per FRCSIM instructions https://wpilib.screenstepslive.com/s/4485/m/23353/l/228979-installing-frcsim-manually-ubuntu)
[/li][LIST]
[li]cd ~/wpilib/simulation/gz_msgs
[/li][li]rm -r build
[/li][li]mkdir build
[/li][li]cd build
[/li][li]cmake …
[/li][li]make install
[/li]

[/ul]
[/LIST]
[li]Install Gazebo 8
[/li][ul]
[li]sudo apt-get install gazebo8 libgazebo8-dev
[/li][/ul]

[li]Get Models
[/li][ul]
[li]2016 Stronghold field: http://first.wpi.edu/FRC/roborio/release/simulation/downloads/frc2016.world
[/li][LIST]
[li]This is what I tested with.
[/li][/ul]
[li]2017 STEAMworks World courtesy of https://www.chiefdelphi.com/forums/showpost.php?p=1645718&postcount=4
[/li]

[/LIST]
[li]Notes from JAVA testing
[/li][ul]
[li]Used GearsBot example code.
[/li][li]Made some simulation-specific fixes to the GearsBot code:
[/li][LIST]
[li]Modified joystick controller axes, per this: https://www.chiefdelphi.com/forums/showpost.php?p=1624274&postcount=2
[/li][li]Fixed “NaN” issue, per this: https://www.chiefdelphi.com/forums/showpost.php?p=1528196&postcount=12
[/li][li]Had to change a Java compiler setting to 1.7 “compliance level”, per http://code2care.org/2015/eclipse-syntax-error-annotations-are-only-available-if-source-level-is-1.5-or-greater/
[/li][/ul]
[li]Inserted GearsBot model into the Stronghold world (frcsim ~/wpilib/simulation/worlds/frc2016.world).
[/li][li]I was able to drive!
[/li][/LIST]
[li]Notes on C++ testing:
[/li][ul]
[li]Used GearsBot example code.
[/li][li]Updated joystick axes.
[/li][li]Had issue launching the simulation program. "Cannot run program “linux_simulate/FRCUserProgram/”
[/li][li]I added a line in build.properties to set “sim.exe=Debug/${out}”, per http://forums.usfirst.org/showthread.php?23989-WPI-robot-samples-NOT-showing-the-popup-quot-FRC-Simulation-DriverStation-quot-box
[/li][li]Now the error is “Debug/FRCUserProgram: 1: Debug/FRCUserProgram: Syntax error: word unexpected (expecting “)”)”
[/li][li]I have not found the solution yet. Not sure if this is a side-effect of my “new” combination of build/simulation tools.
[/li][/ul]
[/LIST]

I hope this helps.
-Greg

Hi Jimmy,

Thanks for sharing. For those who wanted to try it, unzip with : tar -xvf filename
I have been able to load the world in frcsim (gazebo). It looks pretty good.

Have you tried to insert a robot? When I tried, the robot tend to “explode” into pieces after a few seconds and gazebo crashes.

Patrick
Team 3550

Exploding robots is just one of the fun challenges you are going to face. The models exported by solid works are a good start, but are usually imperfect. It took me many nights and a lot of hours to get a model that would work. I ended up having to learn SDF format in detail, and make sure I had inertias for everything, and really thoughtfully analyzing the whole model. (For the exploding robot, slow time way down; you can see when the explosion starts, and sometimes get a clue as to which part is causing it).

Not trying to be a debbie downer, but from there, you will then swiftly find that wheels are not easy to model in Gazebo. You may have better luck with that than I, but I pretty much could not get gazebo to model a drive train with realistics physics. Some googling persuaded me that is hard (there are PHDs that do that for a living).

Our lead programmer wrote a specialized plugin to inject movement to simulate mecanum wheels; it works so-so for us. He’s crazy stressed with final stuff before bag day, but I’m hoping to persuade him to release it as a paper.

But again, it is not for the faint of heart; it requires custom compiling a new plugin. It will take someone with fairly good Linux fu and a lot of patience to get you a driving simulation.

So, I think we are getting some value from frcsim, but it was only after a far larger effort than was expected. Consider yourself warned :-/.

Cheers,

Jeremy

I second Jeremy. I think there is a lot of potential here, but it takes a lot of effort to do something useful. My hope is that getting a Windows version will remove one level of installation complexity.

I was able to insert and drive the “PacGoat” model in the STEAMworks world. GearsBot did not work so well.

WPI folks did a Conference session and demo at Worlds last year, and that has inspired me to embrace FRCSIM. At the Conference session (http://wp.wpi.edu/wpilib/files/2016/05/FRC-Gazebo-Presentation.pdf), they did mention that complex mechanical systems are too much for Gazebo simulation. The example they used was that tank treads did not work well, but you could emulate their effect by having multiple small wheels than mimic the shape. And like Jeremy said, the robot models exported from SolidWorks also take some SDF tweaking to work right.

-Greg

I just went through this (before I found this post). Looks like I did everything pretty much the same, except that I installed gazebo8 first. Don’t you need that to build the wpilib simulation?