Question: # ! / usr / bin / python 3 import rospy import math import tf 2 _ ros import geometry _ msgs . msg if
#usrbinpython import rospy import math import tfros import geometrymsgsmsg
if namemain:
rospy.initnodetflookathand'
tfBuffer tfros.Buffer
listener tfros.TransformListenertfBuffer
rate rospy.Rate
while not rospy.isshutdown:
try:
trans tfBuffer.lookuptransformHead 'LFingerlink', rospy.Time except tfros.LookupException, tfros.ConnectivityException, tfros.ExtrapolationException:
rate.sleep
continue
printtrans: x: f y: f z: f trans.transform.translation.x trans.transform.translation.y trans.transform.translation.z
rate.sleep
Please use the code above to answer the following:
Write a node that uses the headeyes to gesture toward the hand
Write another node that keeps the head pointed at the hand
Write a final node that look in the direction that the hand is pointing
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
