-
This project is developed and tested with Unity Version 2020.3.29f1. Install the version through the Unity Hub from this link
-
Clone the repository
$ git clone https://github.com/AndreiVoica/P8_duaro.git
and$ catkin_make
. -
Open the Unity Project Unity_env in your Unity Hub.
-
Open the Package Manager from Unity Menu. Click
Window -> Package Manager
. A new package manager window will appear. -
Click on the
+
sign on the top left corner of the package manager window and click onAdd Package from Git URL
.
-
Install the URDF Importer: Enter the git URL for the URDF Importer with the latest version tag (currently v0.5.2)
https://github.com/Unity-Technologies/URDF-Importer.git?path=/com.unity.robotics.urdf-importer#v0.5.2
in the text box and pressEnter
. For more information follow this link -
Install the ROS-TCP-Connector: Enter
https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector
.
-
Source the workspace:
$ source devel/setup.bash
-
Run:
$ roslaunch ros_tcp_endpoint endpoint.launch
For more information follow this link
-
Install the com.unity.ml-agents package through the Package Manager in Unity. This project is tested with version 2.2.1.
-
Install Python 3.6 or 3.7. If needed, create a virtual environment for this, for example as described in this link. And this link
-
Install the mlagents Python package:
$ python -m pip install mlagents==0.28.0
. This project uses the version 0.28.0. -
Try to run
$ mlagents-learn --help
to ensure it works.
- Under
Robotics
tab go toROS settings
and change the IP to127.0.0.1
Port:10000
.
- Under
Robotics
tab go toGenerate ROS messages
. - Press
Browse
add select yoursrc
folder location.
- Build all the msgs, srvs and actions as shown here:
Run:
roslaunch khi_duaro_moveit_config test.launch
This will start the tcp connection and start the python script containing the goal positions for Duaro.
You can press Play
in Unity before or after runnning the above command.
Rviz can be ignored, although it will be used for a bit while we create the skills. (Update this line at a later date)
- Getting started example link