コード例 #1
0
ファイル: goal_pos.py プロジェクト: Satantarkov/NaoPFC
def main():
	rospy.init_node('goal_pos')
	motionProxy = init_robot.start_motion()
	postureProxy = init_robot.start_posture()
	markProxy = init_robot.start_mark_detection()
	memProxy = init_robot.start_memory()
	launcher(motionProxy, postureProxy, markProxy)

	pub = rospy.Publisher('goal', Point, queue_size=1)
	rate = rospy.Rate(5) #5Hz

	while not rospy.is_shutdown():
		publish_goal(memProxy, pub)
		rate.sleep()

	redgoalTrackerProxy.stopTracker()
	postureProxy.goToPosture('StandInit', 1.0)	
コード例 #2
0
ファイル: kicker.py プロジェクト: Satantarkov/NaoPFC
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)