These are the instructions to get CoppeliaSim running on your own personal computer, connected to the ROS Topics inside a Docker container. The simulation currently reads a custom_msgs/ThrusterSpeeds
of thruster values from the topic /offboard/thruster_speeds
. This is expected to be an array of 8 ints, each from -128 to 128. This array should be in the order top-front-right, top-front-left, top-back-right, top-back-left, bottom-front-right, bottom-front-left, bottom-back-right, bottom-back-left.
Additionally, it publishes a Odom to /sensors/dvl/odom
, and an Imu to /sensors/imu/imu
.
This readme assumes that you are running the Docker containers for local testing.
First, download CoppeliaSim Edu for your OS version from this link. Then, follow the steps below for your specific OS.
Run the downloaded .exe file.
Move the downloaded tar file to where you'd like the CoppeliaSim folder, and run tar -kxvf [filename]
.
- Unzip the download and move the resulting folder to Applications
- To run, click on CoppeliaSim inside of that folder
- If you get an error about models not found, run the following at the top of the CoppeliaSim folder
sudo xattr -r -d com.apple.quarantine *
- Open CoppeliaSim.
- Go to
File>Open Scene...
and openempty_scene.ttt
inpersonal/scenes
. - Press the play button to start the simulation. The robot should start bobbing up and down.
- In the onboard container, make sure
roscore
is running. - Run
roslaunch simulation base_sim.launch
in the landside container. If you don't have any thruster speed publishing code and would just like to test basic movement in a square, instead runroslaunch simulation test_sim_comm.launch
. OnceStarting main loop
is displayed, the simulation is ready to receive inputs. - Run whatever ROS topic publishing code you have. If you ran the test_sim_comm launch file,
scripts/square_command.py
will be executed, which publishes thruster values to naively make the robot move in a square (in reality, the robot will spin in wide circles because the robot isn't balanced). - The robot should start moving, if everything is successful.
On Windows machines with high res displays, some apps will not scale the font correctly. This happens because some applications essentially “tell” Windows that it will handle the scaling, but then don’t. To fix this, right click on the application icon, go to properties, compatibility, change high DPI settings, check override, and select system.