Gazebo Running Instructions Alice
From DGC Wiki
Contents |
Gazebo Status
- What works:
- Throttle, Brake, Steer actuators
- Alice Dynamics
- FakeState (astate simulator)
- LADAR interface
- Stereo needs a little tweaking to interface properly with Alice
- What Doesn't work:
- Transmition, Estop actuators (Not working on Alice yet)
- If you have suggestions for Gazebo or problems running the simulation, please add bugs to Bugzilla and cc:team-modeling.
- Additional documentation on Alice dynamics: README
Gazebo setup to be done on Moscow
Following these directions to set up a gazebo simulation running on moscow. Note that the recommended practice is to start all modules/executables from $DGC/bin.
Step 1: Compile the codebase
- Execute the following (note the machine names) in the $DGC directory:
~/dgc user@gcdev$ make all
- This will compile and install the gazebo stuff: fakestate, SDSsim, and the world files
~/dgc user@moscow$ make gazebo
Step 2: Starting Gazebo
- Steps 2-5 and ladarFeeder need to be run on moscow. In $DGC/bin, execute the following:
wxgazebo worlds/spring_field_test.world
- You can replace this world file with any other one in that directory
- If you use a world file that includes the Corridor plug-in, you need to make sure that rddf.dat is in the current directory and links to the RDDF that you want to use.
- Note that the Corridor plug-in will cause Gazebo to run slowly if there are too many waypoints so the plug-in only shows the first 100
- Two windows should open up: guicam and Gazebo: simulation control.
- If you get: ImportError: No module named wxgazebo.main
try adding this to your bashrc
[ -f $HOME/dgc/local/files/dgc.bashrc ] && source $HOME/dgc/local/files/dgc.bashrc
Step 3: Starting Player
- In $DGC/bin, execute the following:
player -g default alice.cfg
- Player should start and you should see "listening on port XXXX" where XXXX is some number.
Step 4: Starting FakeState (astate simulation)
a) Remember that the actual astate is being replaced by this module. Do not run astate
b) In $DGC/bin, execute the following:
./fakestate [-n northing_off] [-e easting_off] [-f starting waypoint number] <skynet key>
- The -n and -e options allow you to set the offset for the northing and easting files (by default these are initalized to someplace outside of Victorville, CA if no rddf is in use, otherwise it points to the first (or specified) waypoint in the rddf.
Step 4: Starting SDSsim (Actuator simulation)
SDSsim is what adrive will be connecting to in order to interface with player/gazebo
- In $DGC/bin, execute the following:
./SDSsim
Step 5: Starting adrive in simulation mode
Before starting adrive, the file adrive.config in the current directory must be edited!
a) comment the line: #define SERIAL in brake.h, throttle.h, and parker_steer.h, which are in /dgc/drivers/alice/ and recompile adrive.
b) Change the port numbers to use the SDS (i.e. "gas_port 3" etc.)
- remove the '#' in front of the following lines to enable them
- enable_gas_command
- enable_steer_command
- enable_brake_command
- enable_gas_status
- enable_steer_status
- enable_brake_status
- enable_skynet (only if you need adrive to accept commands over skynet)
- remove the '#' from the following lines:
- enable_simulation (make sure the IP address that follows matches Moscow's (192.168.0.241))
- enable_estop_command
- enable_estop_status
c) Once these modifications are made, adrive.config should have the following options:
gas_port 3 brake_port 2 estop_port 5 trans_port -1 steer_port 1
enable_gas_command enable_steer_command enable_brake_command #enable_trans_command #enable_estop_command
enable_gas_status enable_steer_status enable_brake_status #enable_trans_status #enable_estop_status
enable_sparrow enable_skynet enable_logging
enable_simulation 192.168.0.241
- If you choose to have adrive accept skynet commands, make sure skynetd is running on the same machine as adrive (cobalt). You can check the skynetd processes with "psd" if you are sourcing dgc.bashrc. Make sure that the skynet key used here is the same as the one on Moscow, set in step 3.
d) In $DGC/bin, execute the following:
./adrive
At this point, Gazebo should be running and able to accept commands through adrive. You're Done!!
Step 6: Starting the planning code
On a different machine, make sure that a skynetd is started on the same key, and run the following in $DGC/bin:
- ./trajFollower
- ./plannerModule
- ./gui
- ./fusionMapper
- Ladar feeder requires the following additional commands to be run BEFORE you attempt to start it (execute all in dgc/bin on MOSCOW!!
- export GAZEBO=1
- export PLAYER=1
- make -C ../drivers/ladar/ clean install
- make -C ../modules/ladarFeeder/ clean install
- NOW start ladarfeeder:
- ./ladarFeeder --ladar roof --nolog --now --sim
- ./gui cannot be running ON moscow or on any ssh daisy-chain that goes through moscow (because gtk isn't installed).
- You'll need to switch the ESTOP position to 2 in the sparrow display for adrive. To do this, move the cursor in the adrive sparrow display to the Estop postition field and press 2 then <Enter>. Even though the disable flags are set in the config, the sparrow display is active for the estop modes.
Known Bugs
Please provide links here to the Bugzilla bug.
- Sometimes you need to remove a /tmp/gazebo-username-0 (gazebo will tell you).
- Player sometimes barfs with "bytes leftover on write()" warnings (bug #1594). You have to restart player, fakestate, SDSsim, and adrive when this happens.
- If someone else uses gazebo you may get an error like "unable to query semaphore permission denied" fo fix this (see bug #1588):
- get root
- # cat /proc/sysvipc/sem
- look at the first number you see under "key"
- # ipcrm -S <number>
- run cat /proc/sysvipc/sem again to see that the key has been removed
- If you get "ImportError: No module named wxgazebo.main", you should check your PKG_CONFIG_PATH and PYTHONPATH environment variables. These should now be set by default (see bug #1653).
Using Gazebo for Stereo
- Jeremy Gillula is working on this; 24 Mar 05
![[Main Page]](../../../../upload/alice.jpg)