예제 #1
0
def launcher(motionProxy, postureProxy, markProxy):
	init_robot.stiffness_on(motionProxy)
	init_robot.init_pos(postureProxy)
	videoDeviceProxy = camera.init_camera()	
	camera.up_camera(videoDeviceProxy)
	period = 500 # ms
	markProxy.subscribe('goal_pos', period, 0.0)
예제 #2
0
def main():
	motionProxy = init_robot.start_motion()
	postureProxy = init_robot.start_posture()
	rospy.init_node('kicker', anonymous=True)
	if not rospy.has_param('frames'):
		rospy.set_param('frames', 10) #valor default
	frames = rospy.get_param('frames')

	target_x = calculate_target_x(frames)
	target_y = calculate_target_y(frames)

	prepare_kick(motionProxy)
	basic_kick.basic_kick(motionProxy)
	#kick(motionProxy, target_x, target_y, deviation)
	trajectory = get_trajectory()
	rospy.loginfo('Ball trajectory: ' + str(trajectory))
	trajectory_to_csv(trajectory, alpha)
	# print_trajectory(trajectory)
	init_robot.init_pos(postureProxy)