# hivecore_robot_vision



#### 安装教程

1.  Gemini SDK:

	> 安装 deb 依赖项:
	```	
	# ssume you have sourced ROS environment, same blow
	sudo apt install libgflags-dev nlohmann-json3-dev  \
	ros-$ROS_DISTRO-image-transport ros-${ROS_DISTRO}-image-transport-plugins ros-${ROS_DISTRO}-compressed-image-transport \
	ros-$ROS_DISTRO-image-publisher ros-$ROS_DISTRO-camera-info-manager \
	ros-$ROS_DISTRO-diagnostic-updater ros-$ROS_DISTRO-diagnostic-msgs ros-$ROS_DISTRO-statistics-msgs \
	ros-$ROS_DISTRO-backward-ros libdw-dev
	```
	> 安装 udev 规则
	```
	cd  ~/workspace/src/orbbec_camera/scripts
	sudo bash install_udev_rules.sh
	sudo udevadm control --reload-rules && sudo udevadm trigger
	```

2.  RealSense SDK:

	```
	sudo apt install ros-humble-librealsense2*
	```
	
3.  Dependency:

	```
	"idge=3.2.1"
	"numpy>=1.23.0, <2.0.0",
	"matplotlib>=3.3.0",
	"opencv-python>=4.6.0",
	"pillow>=7.1.2",
	"pyyaml>=5.3.1",
	"requests>=2.23.0",
	"scipy>=1.4.1",
	"torch>=2.7.1",
	"torch>=1.8.0,!=2.4.0; sys_platform == 'win32'",
	"torchvision>=0.9.0",
	"tqdm>=4.64.0",
	"psutil",
	"py-cpuinfo",
	"pandas>=1.1.4",
	"open3d",
	```

#### 使用说明
1. 启动相机和检测节点: 

        ros2 launch detect_part camera_detect.launch.py

	> camera_detect.launch.py 中可以修改部分参数:set_confidence,   output_boxes, output_masks, checkpoint_name

	> 坐标系设置为：Z为图像深度，XY平面为图像成象平面

2. 接收位置话题节点: 

        ros2 run detect_part sub_pose_node

3. 位置话题接口: 

        interface/msg/PoseWithID.msg, PoseWithIDArray.msg
		
4. 话题名称: 
	 
        /pose/cv_detect_pose # 位置
        /image/detect_image  # 目标识别图片
		
5. PoseWithID.msg：

        string class_name
        int32 class_id
        geometry_msgs/Pose[] pose_list

6. PoseWithIDArray.msg：

        PoseWithID[] objects
