Skip to content

Latest commit

 

History

History
77 lines (61 loc) · 2 KB

File metadata and controls

77 lines (61 loc) · 2 KB

Implementation of object classifier conveyor system in ROS2-Gazebo.


system ros node graph

SETUP

sudo apt install -y ros-humble-desktop 
sudo apt install python3-colcon-common-extensions
  • add this to .bashrc
#underlay ros2 setup
source /opt/ros/humble/setup.bash

#colcon cd
source /usr/share/colcon_cd/function/colcon_cd-argcomplete.bash

#colcon argcomplete
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash

#source local bashrc
# if [ !( ./ -ef ~ ) ]; then
if [ "$(realpath $PWD)" != "$(realpath $HOME)" ]; then
# echo $PWD
source $PWD/.bashrc
source install/setup.bash
fi
  • open a new terminal in dev_ws directory
sudo apt install python3-rosdep
sudo pip3 install transforms3d
sudo rosdep init
rosdep update
rosdep install -i --from-path src --rosdistro humble -y

BUILD

  • build the workspace from dev_ws directory
colcon build

RUN

  • open new terminal from dev_ws or source dev_ws/install/setup.bash
  1. To setup the sim world
ros2 launch conveyorbelt_gazebo conveyorbelt.launch.py
  1. [To start the belt] again open a new terminal as above to source as mentioned above in a new terminal
ros2 service call /CONVEYORPOWER conveyorbelt_msgs/srv/ConveyorBeltControl "{power: 10, belt_changer_velocity: 0.5}"
  1. [To start spawn boxes] again open new terminal as above
ros2 run ros2_conveyorbelt SpawnObject.py

DEMO

Watch the video