example_passthrough_client.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:unrealcv-ros 作者: jskinn 项目源码 文件源码
def main():
    set_location_service = rospy.ServiceProxy('set_camera_location', services.SetCameraLocation)
    set_rotation_service = rospy.ServiceProxy('set_camera_rotation', services.SetCameraRotation)
    get_image_service = rospy.ServiceProxy('get_camera_view', services.GetCameraImage)

    set_location_service(0, geom_msgs.Point(x=100, y=-270, z=100))
    set_rotation_service(0, geom_msgs.Quaternion(w=0.70710678, x=0, y=0, z=-0.70710678))
    response = get_image_service(0, 'depth')

    opencv_bridge = cv_bridge.CvBridge()
    image = opencv_bridge.imgmsg_to_cv2(response.image)
    cv2.imshow('test', image)
    cv2.waitKey()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号