The main repository for PHINIX. The current setup is developed and tested on Ubuntu 20.04 with ROS2 Foxy.
-
Install ROS2 Foxy using the binary version. Follow this.
-
Include
source /opt/ros/foxy/setup.bash
in bashrc. -
Make sure ROS2 installed correctly by running the talker listener examples explained in the above link.
-
Install colcon for ROS2, follow here.
sudo apt-get install vim git -y
-
cd ~
-
git clone [email protected]:ximira-org/PHINIX.git
-
cd ~/PHINIX
Install pip for Python 3: sudo apt-get install python3-pip
Install vcs tool: sudo pip install vcstool
setup the required code
sh setup_code.sh
Recently switched to using a custom Python implementation of DepthAI.
Delete the old Ros2 implementation located in: /PHINIX/src/external
,
leaving the depthai-python
folder.
Build the Docker File
docker build -f utilities/docker/Dockerfile --build-arg USE_RVIZ=1 -t phinix_openvino_ros2 .
In the below command replace with your system user name
docker run --name phinix_container -it -v /dev/:/dev/ -v /home/<username>/PHINIX:/home/PHINIX -v /tmp/.X11-unix:/tmp/.X11-unix --privileged -e DISPLAY phinix_openvino_ros2
If PHINIX repo is downloaded to different location, replace /home/<username>/PHINIX
with the correct path in the above command
-
cd /home/PHINIX
-
In file
~/PHINIX/src/external/depthai-ros/depthai_filters/CMakeLists.txt
edit line 7 fromset(opencv_version 4)
toset(opencv_version 4.7.0)
-
source /opt/ros/foxy/setup.bash
-
./src/external/depthai-ros/build.sh -s $BUILD_SEQUENTIAL -r 1 -m 1
-
colcon build
-
source install/setup.bash
ros2 launch phinix_launch phinix.launch.py camera_model:=OAK-D-PRO-W
Open new terminal (for rviz2)
-
xhost +local:docker
-
docker exec -it phinix_container bash
-
source install/setup.bash
-
rviz2
# add the necessary topics for visualization
Below steps are for launching nodes invidually. The below steps are not needed if phinix.launch.py
(above) is launched.
-
cd /home/PHINIX
-
source install/setup.bash
-
ros2 launch depthai_ros_driver camera.launch.py camera_model:=OAK-D-PRO-W
Open new terminal:
-
docker exec -it phinix_container bash
-
cd /home/PHINIX
-
colcon build --packages-select phinix_sensor_abstractor
# optional, colcon build builds automatically -
source install/setup.bash
-
ros2 run phinix_sensor_abstractor phinix_sensor_abstractor_py_exe
Open new terminal:
-
docker exec -it phinix_container bash
-
cd /home/PHINIX
-
colcon build --packages-select phinix_text_detector
# optional -
source install/setup.bash
-
ros2 run phinix_text_detector phinix_text_detector_py_exe
Open new terminal (for TTS simulator):
-
docker exec -it phinix_container bash
-
cd /home/PHINIX
-
source install/setup.bash
-
ros2 run phinix_tts_balacoon phinix_tts_simulator_py_exe
# if simulator is needed
Open new terminal (for TTS node):
-
docker exec -it phinix_container bash
-
cd /home/PHINIX
-
source install/setup.bash
-
ros2 run phinix_tts_balacoon phinix_tts_balacoon_py_exe --ros-args --params-file src/phinix_ui/phinix_tts_balacoon/param/phinix_tts_balacoon.param.yaml
Open new terminal (for rviz2)
-
xhost +local:docker
-
docker exec -it phinix_container bash
-
source install/setup.bash
-
rviz2
# add the necessary topics for visualization