WPI in conjunction with the Open Source Robotics Foundation has developed a 3-D simulation tool for FRC teams coding their robots in C++ or Java with WPILib. It’s pretty much limited to the sample robots you get with the development package right now but it’s great for students to try out the code or use the command framework to build some new commands. This exposure to the API doesn’t require a robot – which in the first few weeks of the project is a great thing. [more details]
The underlying tool for the FRCSim, Gazebo, isn’t very friendly about telling you what the problem might be before it dies an ugly death. Most likely the problem is you’re seeing errors about the “Gazebo Transport” in Eclipse since it’s unable to connect to the dead Gazebo server. I’ve documented some steps to try and determine the cause of your problem.
1) Make sure you’re following the latest steps for running the tool and have a proper updated Ubuntu installation. You need to be on the 64-bit version of the OS. To verify this try typing the following on the command:
> uname output
You should see X86_64 in the output. If you don’t your machine isn’t compatible or you installed the 32bit OS version.
2) Try running the following command to launch the Gazebo server directly and look for any human readable errors in the log:
> frcsim -u –verbose /usr/share/frcsim/worlds/GearsBotDemo.world
You can look at the log files in ~/.gazebo for any useful error information. It will be cryptic but maybe you’ll find something useful. I wouldn’t spend a lot of time here but maybe you’ll see some obvious failure.
3) Determine if your card supports direct rendering. Try the following command. If you see output of “direct rendering: Yes” that’s good.
> glxinfo | grep “direct rendering”
If you don’t see the right output see step below.
4) If you’re still stuck your video card may not be supported. If you’re using an integrated controller you’ll likely need to try an ATI or nVidia dedicated card. I tried 2 linux laptops and a desktop all with integrated controllers from a variety of vendors (with correct support for direct rendering). Only after updating the desktop with a super cheap $30 nVideo card was I able to get the simulator to run – and runs pretty well from limited testing.
If you’re stuck hopefully some of the stuff above helps out. Thanks to Alex Henning for the tips!