mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
fix: #13 end rotation axis error
This commit is contained in:
parent
ed258d22c4
commit
d9ef4d10bd
2 changed files with 6 additions and 4 deletions
|
|
@ -9,12 +9,11 @@ from pymycobot.mycobot import MyCobot
|
|||
|
||||
|
||||
def callback(data):
|
||||
rospy.loginfo(rospy.get_caller_id() + "%s", data.position)
|
||||
#rospy.loginfo(rospy.get_caller_id() + "%s", data.position)
|
||||
# print(data.position)
|
||||
data_list = []
|
||||
print(data.position)
|
||||
for index, value in enumerate(data.position):
|
||||
if index != 2:
|
||||
value *= -1
|
||||
data_list.append(value)
|
||||
|
||||
mc.send_radians(data_list, 80)
|
||||
|
|
@ -29,7 +28,10 @@ def listener():
|
|||
rospy.spin()
|
||||
|
||||
if __name__ == '__main__':
|
||||
print('sart')
|
||||
port = subprocess.check_output(['echo -n /dev/ttyUSB*'],
|
||||
shell=True).decode()
|
||||
print(port)
|
||||
mc = MyCobot(port)
|
||||
print(mc)
|
||||
listener()
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@
|
|||
</joint>
|
||||
|
||||
<joint name="joint6output_to_joint6" type="revolute">
|
||||
<axis xyz="0 1 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort = "1000.0" lower = "-3.14" upper = "3.14159" velocity = "0"/>
|
||||
<parent link="joint6"/>
|
||||
<child link="joint6_flange"/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue