CoppeliaSim Setup / Overview


Using CoppeliaSim

CoppeliaSim Environment

Once you have been instructed to run CoppeliaSim, follow the instructions below:

Prerequisites: Open a terminal window and run ROSCORE. Then open another terminal window.

Run CoppeliaSim: from the new terminal window and go to the executable folder. For example:

cd /opt/CoppeliaSim_Edu
Code snippet

Run the following command:

./coppeliaSim.sh
Code snippet

Everything you require should be installed. If not, let me (Dr. Assaf) know I will provide you with a library and instructions on where to install it.

To access to the environment once CoppeliaSim is open (as shown in )…

CoppeliaSim When First Opened.
CoppeliaSim When First Opened.

…click File → Open scene

Scene Selection Window.
Scene Selection Window.

…enter in the folder ROS_Robot_environments (as shown in )…

…and select obstacle_env.ttt, as shown in .

Scene Selection.
Scene Selection.

After loading the scene you should see a dialog box. Select differential robot.


Hopefully at this point you won’t get any errors, and will arrive at a screen that looks like the one shown in , below.

Loaded Scene.
Loaded Scene.

If all is well you should see something like , below.

Selected System.
Selected System.

Be sure to click ok on the screen shown in below, before running your ROS code.

Warning Pop-up.
Warning Pop-up.
Ready to Run the Simulation.
Ready to Run the Simulation.

Check if Everything is Working as Expected

Open a new terminal window.

Before anything you should check all the elements are connected.

A tell-tale sign is to visualize the topics currently available. To do this, run the following command in your terminal window in your current workspace:

rostopic list
Code snippet

You should see a list of topics like that shown in below.

Expected and Correct ROS Topic List.
Expected and Correct ROS Topic List.

If you see those topics, let’s check if they are actually active by running the following command:

rostopic echo + <name of topic> e.g.:

rostopic echo /cop/twist
Code snippet

You should receive a response like that shown in below.

ROS Topic Echo Response.
ROS Topic Echo Response.

Press Keys: ctrl+c to terminate the echo command.


Another example, this time a sensor topic. Input command:

rostopic echo /cop/prox_sensors
Code snippet

The output response is shown in below.

ROS Topic Echo Response for Sensor Topic.
ROS Topic Echo Response for Sensor Topic.

Press Keys: ctrl+c to terminate the echo command.