Used ROS2, gazebo, and Moveit to program an franka panda robot arm model to recognise blocks of different colours and move them to a bin autonomously using opencv.
![]() |
/> |
-
Clone the repo
-
Install all necessary packages and dependencies
-
Run the following commands in terminal to start the gazebo simulation, RViz, camera and colour detection, Moveit, and the Robot controllers
colcon build source install/setup.bash ros2 launch panda_bringup pick_and_place.launch.pyopen another terminal to run
source install/setup.bash ros2 run pymoveit2 pick_and_place.py --ros-args -p target_color:=RTarget colour can be R, B, or G. Which stand for Red, Green, and Blue respectively.
To pick another colour after the first one, press
ctrl+cin the second terminal then runros2 run pymoveit2 pick_and_place.py --ros-args -p target_color:=Bwith your desired colour to rerun the operation.

