Installation - Prethivi1608/Smart_Factory GitHub Wiki
lsb_release -a
Expected output
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
The Ubuntu version should be 22.04. Ubuntu Installation guide
Install ultralytics
pip install --upgrade pip
pip install ultralytics
Check the version
yolo --version
Expected output
Ultralytics YOLOv8.0.x 🚀 Python-3.x Torch-x.x CUDA:x.x (if GPU available)
Additional Dependencies
pip install opencv-python numpy
sudo apt install ros-humble-cv-bridge ros-humble-image-transport
Check the ROS2 version
printenv | grep ROS_DISTRO
Expected Output
ROS_DISTRO=humble
This means ROS2 is correctly installed.
If output:
Command 'ros2' not found
means ROS2 is not correctly installed. Install ROS2
CTRL+ALT+T opens a new terminal
Expected output (in terminal)
user@ubuntu:~$
Clone the project repository
git clone https://github.com/Prethivi1608/Smart_Factory
Build the package
cd ~/Smart_Factory/smart_factory_ws
colcon build
Setup the ROS_DOMAIN_ID and Turtlebot3 Model
export ROS_DOMAIN_ID=<any number>
export TURTLEBOT3_MODEL=waffle
Source the package
source ~/Smart_Factory/smart_factory_ws/install/setup.bash
Load the cmmand to .bashrc file (No need to run the source everytime when terminal is opened)
echo "source ~/Smart_Factory/smart_factory_ws/install/setup.bash" >> ~/.bashrc
echo "export ROS_DOMAIN_ID=<any number>" >> ~/.bashrc
echo "export TURTLEBOT3_MODEL=waffle" >> ~/.bashrc
In package.xml
<depend>rclpy</depend>
<depend>sensor_msgs</depend>
<depend>turtlebot3_msgs</depend>
<depend>geometry_msgs</depend>
<depend>nav2_bringup</depend>
<depend>smart_factory</depend>
<depend>smart_factory_services</depend>
In CMakeLists.txt
find_package(rclpy REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav2_msgs REQUIRED)
find_package(smart_factory REQUIRED)
find_package(smart_factory_services REQUIRED)
To install all the dependencies listed above
cd ~/Smart_Factory/smart_factory_ws
rosdep install --from-paths src --ignore-src -r -y