Skip to content

Connecting ROS and Unity

Anthony Tan edited this page Nov 13, 2023 · 10 revisions

https://www.youtube.com/watch?v=pdMxLxolQuo

Steps:

  • Open the package manager in Unity (in the window tab)
  • At this git url as a package https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector#v0.7.0
  • Check that the RosConnection game object exists, and that the ros ip is 127.0.0.1 and the port is 10000
  • Make sure you are using the auv-sim-unity repo as a submodule of AUV-2024, not on its own. To do this, clone AUV-2024, enter the repo, then run git submodule update --init --recursive, then entire the auv-sim-unity submodule and run git checkout noetic && git pull.
  • Make sure that the ros tcp endpoint submodule was cloned as well (this was added recently so you may need to run git submodule update --init --recursive again if you haven't in a while).
  • Launch the docker container with docker compose(docker info can be found in the main wiki)
  • Enter the container and run `roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:=127.0.0.1
  • Enter the unity sim and press play, verify that subscribers were registered in the containers command line
Clone this wiki locally