Azure Kinect

ROS_NAMESPACE=azure1 roslaunch azure_kinect_ros_driver driver.launch fps:=5 color_resolution:=720P
- driver.launch 파일을 열어보면 더 자세한 옵션들을 알 수 있다.
- ROS_NAMESPACE=azure1을 통해 이름을 부여할 수 있다. 카메라 여러대를 사용할 때 효과적이다.
azure_scene_segmenter.py
# get rgb-depth images of same time step
rgb_sub = message_filters.Subscriber('azure1/rgb/image_raw', Image)
depth_sub = message_filters.Subscriber('azure1/depth_to_rgb/image_raw', Image)
self.ts = message_filters.ApproximateTimeSynchronizer([rgb_sub, depth_sub], queue_size=5, slop=0.1)
rospy.loginfo("Starting rgb-d subscriber with time synchronizer")
# from rgb-depth images, inference the results and publish it
self.ts.registerCallback(self.inference)
ROS_NAMESPACE를 azure1으로 했기 때문에 Suscriber의 맨 앞에 azure1이 붙음

ROS 메시지를 통해 카메라 영상을 받아오고 다시 publish할 때 이미지 타입(e.g. "rgb8", "brg8" etc)을 잘 정해주어야 이미지를 받아볼 수 있다.




댓글

이 블로그의 인기 게시물

로봇의 작업영역(Workspace)

Frenet-Serret formulas (프레네-세레 공식)

yes24 [뷰어 서버의 기본정보가 존재하지 않습니다.] 오류 해결