This commit is contained in:
Max Hunt 2020-02-10 20:39:34 +00:00
parent a9b703214d
commit 4b2be230b2
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,6 @@ from gazebo_msgs.msg import LinkStates
global SIGKILL # Horrible hack global SIGKILL # Horrible hack
SIGKILL = False SIGKILL = False
a = 0
class tf_service(): class tf_service():
def __init__(self): def __init__(self):
@ -48,10 +47,8 @@ class tf_service():
rospy.signal_shutdown('User_requested') #SURPRISINGLY DIFFICULT rospy.signal_shutdown('User_requested') #SURPRISINGLY DIFFICULT
def gazebo_link_subscriber(self): def gazebo_link_subscriber(self):
global a
# rospy.init_node('gazebo_link_subscriber') # rospy.init_node('gazebo_link_subscriber')
rospy.Subscriber("/gazebo/link_states", LinkStates, self._callback) rospy.Subscriber("/gazebo/link_states", LinkStates, self._callback)
a+=1
# spin() simply keeps python from exiting until this node is stopped # spin() simply keeps python from exiting until this node is stopped
rospy.spin() rospy.spin()

7
run
View File

@ -9,9 +9,12 @@ mv object_tf_service.py ../
echo 4 echo 4
cd ../ cd ../
echo 5 echo 5
python main.py rm object_tf_service.pyc
echo 6 echo 6
mv main.py RoboticSandbox/ python main.py
echo 7 echo 7
mv main.py RoboticSandbox/
echo 8
mv object_tf_service.py RoboticSandbox/ mv object_tf_service.py RoboticSandbox/
echo 9
echo Done echo Done