- Syed Hasan Shozab Abidi, [email protected]
- Muhammad Ali Haider Dar, [email protected]
- Soundarya Pallanti, [email protected]
- Abhilash Jakkampudi, [email protected]
MSc Robotics Engineering, University of Genoa, Italy
Instructor: Prof. Fulvio Mastrogiovanni
Visit Unity website and download Unity Hub Through the Hub, install Unity 2020.2.2 (the version for which the projects have been developed) or later. Beware that later versions (eg. Unity 2021.1.x) may be incompatible with the projects
ROS Noetic version was used for this project.
- Download ROS packages required for this project from the main repository.
- Extract the packages to your catkin_ws.
- Replace the 'human_baxter_collaboration' package in the ROS Packages folder with the one given in this repository.
- Open the 'human_baxter_collaboration' package, then navigate to config folder and open the params.yaml file. Under ROS_IP, insert the IP address of your machine.
- Compile packages with catkin_make
- Don't forget you need MoveIt framework for this project, thus install the binaries from here.
- Clone the baxter_common and moveit_robots in the src folder of your workspace. Once you're done, you should have four packages in your workspace: baxter_common, human_baxter_collaboration, moveit_robots, and ros_tcp_endpoint.
- Once all dependencies are resolved, start the roscore.
roscore &
- Run the following command to initialize the ROS/Unity bridge and start communication with Unity (ensure the server communication is up and running, you should see the following line in the terminal 'Starting server on YOUR IP:10000').
roslaunch human_baxter_collaboration human_baxter_collaboration.launch
- Open a new tab, run the following command to start trajectory planner server for robot's right arm.
rosrun human_baxter_collaboration trajectory_planner_server_right.py
- Open a new tab, run the following command to start trajectory planner server for robot's left arm.
rosrun human_baxter_collaboration trajectory_planner_server_left.py
- Open a new tab, run the following command to start sofar_project node which works as Baxter robot controller.
rosrun human_baxter_collaboration sofar_project.py
- Once all the above setups are completed, proceed to the installation of Unity module.
- In order to install the framework for human simulation, follow the steps here to install the precompiled framework.
- Visit the main repository to download the Unity project folder, extract it, then open Unity Hub and ADD the project to your projects list using the associated button.
- Open the project.
- In the bar on top of the screen, open the Ros-TCP-Connection tab and replace the ROS_IP with the IP of the machine running ROS.
- If the previous steps have been successful, you should be able to enter Editor mode (via the Play button) and play the simulation.
- If the communication is running correctly, on UBUNTU you can echo the topics that are being exchanged between ROS and Unity. Happy planning!
- If you experience a strange window when opening the Unity Project for the first time, simply do Quit, then reopen the project and it should not bother you further.
- Should you experience issues in the communication between ROS and Unity, especially when publishing FROM ROS TO Unity, remember to disable the firewall of your PC, as it could interfere with the sending of messages over TCP.
- When running your project, be sure to launch the ROS files BEFORE playing the Unity simulation, in order to have the server endpoint node up and running before initializing communication.
Thanks to:
- Simone Macciò, for helping out with the project and providing the Unity environment and ROS files for us to build further on.
- Marco Gabriele Fedozzi, for helping out with the docker image loaded with all dependencies.