mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
optimize the code
This commit is contained in:
parent
ffb5a5eb68
commit
fe02f05c8f
1 changed files with 3 additions and 2 deletions
5
mypalletizer_260/mypalletizer_260/scripts/listen_real_of_topic.py
Normal file → Executable file
5
mypalletizer_260/mypalletizer_260/scripts/listen_real_of_topic.py
Normal file → Executable file
|
|
@ -21,10 +21,10 @@ class Listener(object):
|
|||
rospy.spin()
|
||||
|
||||
def callback(self, data):
|
||||
"""`mycobot/angles_real` subscriber callback method.
|
||||
"""`mypal260/angles_real` subscriber callback method.
|
||||
|
||||
Args:
|
||||
data (MycobotAngles): callback argument.
|
||||
data (MypalAngles): callback argument.
|
||||
"""
|
||||
# ini publisher object.
|
||||
# 初始化发布者对象
|
||||
|
|
@ -49,6 +49,7 @@ class Listener(object):
|
|||
data.joint_1 * (math.pi / 180),
|
||||
data.joint_2 * (math.pi / 180),
|
||||
data.joint_3 * (math.pi / 180),
|
||||
0,
|
||||
data.joint_4 * (math.pi / 180),
|
||||
# data.joint_5 * (math.pi / 180),
|
||||
# data.joint_6 * (math.pi / 180),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue