-
Notifications
You must be signed in to change notification settings - Fork 3
3.7 Unity Simulation
Unity simulation source code can be found here
Build files can be found in catkin_ws/src/sim/builds
. To launch the sim, enter the build folder that corresponds to your operating system, and run the executable.
ROS communicates uses TCP/IP which is a communication protocol used in networks. The unity sim can publish and subscribe to rostopics using a bridge facilitated by the ros tcp connector unity package. The ros side can communicate with unity via the ros tcp endpoint package. The ros tcp endpoint runs a server on port 10000 while the ros tcp connector (unity) accesses it as a client. The Docker container does not have direct access to port 10000 on the host machine so a port forward is established in the compose.yml file.
Run roslaunch sim sim.launch
to launch the ros tcp endpoint package as well as all necessary packages (controls, state estimation, vision, propulsion, etc.). In another tab, run rosrun planner [your missions file].py
.
If you get the following error: “sim” is damaged and can’t be opened. You should move it to the Trash.
Do not immediately move it to the Trash, as sometimes when you download something, mac puts a sort of block(called a quarantine) on it for safety reasons.
You can remove it by running:
xattr -rd com.apple.quarantine /path/to/sim
(Note: get the /path/to/sim by running pwd in the directory where your sim.app is)
After doing this, make your file executable and it should be good to go.