These are my notes (as best I can remember) on getting FIRST Robotics Competition FRCSim simulator working on Fedora 22/23 in hopes of being able to build robot code and run it on the simulator.
Gazebo plugins and gazebo_msgs build. Can run a simulation but joystick controls are messed up.
-
Follow the standard instructions for setting up the environment for Java-based FRC programming.
-
Download and install the lates FRC simulation code:
cd ~/wpilib
mkdir simulation
cd simulation
wget http://first.wpi.edu/FRC/roborio/maven/release/edu/wpi/first/wpilib/simulation/simulation/1.0.0/simulation-1.0.0.zip
unzip simulation-1.0.0.zip
Install the version that comes with the distribution:
sudo dnf install gazebo gazebo-devel # and maybe others...
OR, download, build, and install a more recent version locally from the source at gazebosim.org.
cd ~
mkdir git
cd git
git clone https://usfirst.collab.net/gerrit/allwpilib
cd allwpilib
mkdir build
cd build
cmake -DSIMULATION_INSTALL_DIR=$PWD/install/simulation ..
make frc_gazebo_plugins
cd ~/wpilib/simulation
mv plugins plugins-official
ln -s ~/git/allwpilib/build/install/simulation/plugins .
ln -s ~/git/allwpilib/simulation/frcsim ~/bin/frcsim # Or elsewhere in your path
Download frcsim-gazebo-models.zip
from https://usfirst.collab.net/sf/frs/do/viewRelease/projects.wpilib/frs.simulation.frcsim_gazebo_models
Unzip it within $HOME/wpilib/siumulation
.
Edit the build.properties
in your robot code project. Change/set:
simulation.world.file=/home/yourusername/wpilib/simulation/worlds/GearsBotDemo.world
Install joystick support:
sudo dnf install joystick-support
Reboot.
Connect a Sony Dual Shock3 controller over USB.