Installation - Prethivi1608/Smart_Factory GitHub Wiki

Software

Operating System

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

Ultralytics for Perception

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

ROS2 version

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

Opening a new terminal

CTRL+ALT+T opens a new terminal

Expected output (in terminal)

user@ubuntu:~$

Clone the repository

Clone the project repository

git clone https://github.com/Prethivi1608/Smart_Factory

Building the package

Build the package

cd ~/Smart_Factory/smart_factory_ws
colcon build

Set up the environment

Setup the ROS_DOMAIN_ID and Turtlebot3 Model

export ROS_DOMAIN_ID=<any number>
export TURTLEBOT3_MODEL=waffle

Sourcing

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 

Declare the dependencies

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)

Install the Dependencies

To install all the dependencies listed above

cd ~/Smart_Factory/smart_factory_ws
rosdep install --from-paths src --ignore-src -r -y
⚠️ **GitHub.com Fallback** ⚠️