mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
280 模型跟随增加异常处理机制
This commit is contained in:
parent
25a3fdc95a
commit
f00bbb2258
3 changed files with 93 additions and 86 deletions
|
|
@ -59,6 +59,7 @@ def talker():
|
|||
while not rospy.is_shutdown():
|
||||
joint_state_send.header.stamp = rospy.Time.now()
|
||||
|
||||
try:
|
||||
angles = mycobot.get_radians()
|
||||
data_list = []
|
||||
for index, value in enumerate(angles):
|
||||
|
|
@ -94,6 +95,8 @@ def talker():
|
|||
pub_marker.publish(marker_)
|
||||
|
||||
rate.sleep()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ def talker():
|
|||
print("publishing ...")
|
||||
while not rospy.is_shutdown():
|
||||
joint_state_send.header.stamp = rospy.Time.now()
|
||||
|
||||
try:
|
||||
angles = mycobot.get_radians()
|
||||
print('angles:',angles)
|
||||
data_list = []
|
||||
|
|
@ -102,6 +102,8 @@ def talker():
|
|||
pub_marker.publish(marker_)
|
||||
|
||||
rate.sleep()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ def talker():
|
|||
print("publishing ...")
|
||||
while not rospy.is_shutdown():
|
||||
joint_state_send.header.stamp = rospy.Time.now()
|
||||
|
||||
try:
|
||||
angles = mycobot.get_radians()
|
||||
data_list = []
|
||||
for index, value in enumerate(angles):
|
||||
|
|
@ -95,6 +95,8 @@ def talker():
|
|||
pub_marker.publish(marker_)
|
||||
|
||||
rate.sleep()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue