from rviz_view_controllers.msg import CameraPlacement from geometry_msgs.msg import Point, Vector3 rospy.init_node("camera_test", anonymous = True) pub = rospy.Publisher("/rviz/camera_placement", CameraPlacement) rate_float = 10 rate = rospy.Rate(rate_float) rospy.Rate(2).sleep() for i in range(3): t = rospy.get_time() cp = CameraPlacement() cp.attached_frame = "r_forearm_cam_frame" p = Point(0,0, 0) cp.eye.point = p cp.eye.header.frame_id = "r_forearm_cam_frame" f = Point(1, 0, 0) cp.focus.point = f cp.focus.header.frame_id = "r_forearm_cam_frame" up = Vector3(0,0,1) cp.up.vector = up cp.up.header.frame_id = "r_forearm_cam_frame"
from geometry_msgs.msg import Point, Vector3 rospy.init_node("camera_test", anonymous=True) pub = rospy.Publisher("/rviz/camera_placement", CameraPlacement) rate_float = 0.25 rate = rospy.Rate(rate_float) rospy.sleep(1) while not rospy.is_shutdown(): # print "Top of loop!" t = rospy.get_time() cp = CameraPlacement() r = 10 p = Point(r * cos(2 * pi * t / 20), r * sin(2 * pi * t / 20), 2) # p = Point(5,5,0) cp.eye.point = p cp.eye.header.frame_id = "base_link" # f = Point(0, 0, 2*cos(2*pi*t/5)) f = Point(0, 0, 0) cp.focus.point = f cp.focus.header.frame_id = "base_link" up = Vector3(0, 0, 1) cp.up.vector = up cp.up.header.frame_id = "base_link"
from rviz_view_controllers.msg import CameraPlacement from geometry_msgs.msg import Point, Vector3 rospy.init_node("camera_test", anonymous = True) pub = rospy.Publisher("/rviz/camera_placement", CameraPlacement) rate_float = 10 rate = rospy.Rate(rate_float) rospy.Rate(1).sleep() for i in range(3): t = rospy.get_time() cp = CameraPlacement() cp.attached_frame = "head_mount_kinect_rgb_link" p = Point(0,0, 0) cp.eye.point = p cp.eye.header.frame_id = "head_mount_kinect_rgb_link" f = Point(1, 0, 0) cp.focus.point = f cp.focus.header.frame_id = "head_mount_kinect_rgb_link" up = Vector3(0,0,1) cp.up.vector = up cp.up.header.frame_id = "head_mount_kinect_rgb_link"
from rviz_view_controllers.msg import CameraPlacement from geometry_msgs.msg import Point, Vector3 rospy.init_node("camera_test", anonymous = True) pub = rospy.Publisher("/rviz/camera_placement", CameraPlacement) rate_float = 10 rate = rospy.Rate(rate_float) rospy.Rate(2).sleep() for i in range(3): t = rospy.get_time() cp = CameraPlacement() cp.attached_frame = "base_link" p = Point(2,2, 2) cp.eye.point = p cp.eye.header.frame_id = "base_link" f = Point(1, 0, 0) cp.focus.point = f cp.focus.header.frame_id = "torso_lift_link" up = Vector3(0,0,1) cp.up.vector = up cp.up.header.frame_id = "base_link"
from rviz_view_controllers.msg import CameraPlacement from geometry_msgs.msg import Point, Vector3 rospy.init_node("camera_test", anonymous = True) pub = rospy.Publisher("/rviz/camera_placement", CameraPlacement) rate_float = 10 rate = rospy.Rate(rate_float) rospy.Rate(2).sleep() for i in range(3): t = rospy.get_time() cp = CameraPlacement() cp.attached_frame = "narrow_stereo_link" p = Point(0,0, 0) cp.eye.point = p cp.eye.header.frame_id = "narrow_stereo_link" f = Point(1, 0, 0) cp.focus.point = f cp.focus.header.frame_id = "narrow_stereo_link" up = Vector3(0,0,1) cp.up.vector = up cp.up.header.frame_id = "narrow_stereo_link"
from rviz_view_controllers.msg import CameraPlacement from geometry_msgs.msg import Point, Vector3 rospy.init_node("camera_test", anonymous = True) pub = rospy.Publisher("/rviz/camera_placement", CameraPlacement) rate_float = 10 rate = rospy.Rate(rate_float) rospy.Rate(2).sleep() for i in range(2): t = rospy.get_time() cp = CameraPlacement() cp.attached_frame = "head_pan_link" p = Point(-3, -0.5, 1.3) cp.eye.point = p cp.eye.header.frame_id = "head_pan_link" f = Point(0.6, -0.25, 0) cp.focus.point = f cp.focus.header.frame_id = "head_pan_link" up = Vector3(0,0,1) cp.up.vector = up cp.up.header.frame_id = "base_link"