Simulating SubjuGator¶
Launch Gazebo Server¶
In one panel, run:
$ roslaunch subjugator_launch gazebo.launch
This will launch the server side of the gazebo simulator. The gazebo server (a.k.a. gzserver
)
is the half of the simulator that will do all the heavy lifting in terms of simulating physics,
running stock / custom plugins (of which we have many), and tying into ROS.
Run Gazebo Client¶
Gazebo also has GUI visualization component named Gazebo Client (a.k.a gzclient
).
This half of the simulator really only does image rendering of the simulated environment.
Warning
Simulated cameras are rendered in gzserver.
We have a custom alias setup to run the gazebogui with special parameters:
$ gazebogui
This will show you ground truth of the simulated environment. However, when debugging robot behavior, it is usually more usful to have an idea of exactly what the robot knows, which is why there is also Rviz.
Run RVIZ¶
You can visualize what the robot knows by running the sub visualization alias in a new terminal:
$ subviz
subviz
is an alias
which launches RVIZ with a configuration
for SubjuGator. Generally speaking, this will show what information is available
to the robot.
Clear the Kill¶
Whenever SubjuGator is initialized, it is a state called “kill” for safety. While in the kill state, the sub will not actuate in any way so it is safe for people the physically handle it. The sub must be put into a state of “unkill” to actually do anything. To unkill the sub, go to a new panel and run:
$ amonitor kill
and then hold Shift + C
until the terminal turns green.
To initiate a software kill, press the space bar into the same terminal where you unkilled.
Give a move command¶
Give SubjuGator a move command with submove
:
$ submove forward 5m
The sub should move forward by 5 meters.
See the current odometry¶
Try streaming the content of a rostopic in a new panel by running:
$ rostopic echo /odom