From 3244f0246c4b1c14c24cf720fc2faa9b330105ed Mon Sep 17 00:00:00 2001
From: wangWking <842749351@qq.com>
Date: Tue, 10 May 2022 18:15:22 +0800
Subject: [PATCH 1/7] fix bug
---
.../mypalletizer_260_pi/scripts/follow_display.py | 4 ++--
.../mypalletizer_260_pi/scripts/slider_control.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/mypalletizer_260/mypalletizer_260_pi/scripts/follow_display.py b/mypalletizer_260/mypalletizer_260_pi/scripts/follow_display.py
index 15576dc..4fe8741 100644
--- a/mypalletizer_260/mypalletizer_260_pi/scripts/follow_display.py
+++ b/mypalletizer_260/mypalletizer_260_pi/scripts/follow_display.py
@@ -15,8 +15,8 @@ def talker():
rospy.init_node("display", anonymous=True)
print("Try connect real mypal...")
- port = rospy.get_param("~port", "/dev/ttyUSB0")
- baud = rospy.get_param("~baud", 115200)
+ port = rospy.get_param("~port", "/dev/ttyAMA0")
+ baud = rospy.get_param("~baud", 1000000)
print("port: {}, baud: {}\n".format(port, baud))
try:
mypa = MyPalletizer(port, baud)
diff --git a/mypalletizer_260/mypalletizer_260_pi/scripts/slider_control.py b/mypalletizer_260/mypalletizer_260_pi/scripts/slider_control.py
index 5f8cfb0..787e4ed 100644
--- a/mypalletizer_260/mypalletizer_260_pi/scripts/slider_control.py
+++ b/mypalletizer_260/mypalletizer_260_pi/scripts/slider_control.py
@@ -26,7 +26,7 @@ def callback(data):
data_list = []
for index, value in enumerate(data.position):
data_list.append(value)
- del data_list[3] # delete the angle of joint3 to joint4,because it do not exsist actually! 把joint3到joint4的角度删掉,因为它实际上不存在!
+ # del data_list[3] # delete the angle of joint3 to joint4,because it do not exsist actually! 把joint3到joint4的角度删掉,因为它实际上不存在!
# data_list[3] = data_list[4]
# print(data_list)
mc.send_radians(data_list, 80)
@@ -38,8 +38,8 @@ def listener():
rospy.init_node("control_slider", anonymous=True)
rospy.Subscriber("joint_states", JointState, callback)
- port = rospy.get_param("~port", "/dev/ttyUSB0") # Select connected device. 选择连接设备
- baud = rospy.get_param("~baud", 115200)
+ port = rospy.get_param("~port", "/dev/ttyAMA0") # Select connected device. 选择连接设备
+ baud = rospy.get_param("~baud", 1000000)
print(port, baud)
mc = MyPalletizer(port, baud)
From 0a0e02847a6d9709163ffd7c876dbc08dd977d4a Mon Sep 17 00:00:00 2001
From: wangWking <842749351@qq.com>
Date: Tue, 10 May 2022 18:17:54 +0800
Subject: [PATCH 2/7] fix urdf
---
mycobot_description/urdf/260_pi/mypal_260_pi.urdf | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/mycobot_description/urdf/260_pi/mypal_260_pi.urdf b/mycobot_description/urdf/260_pi/mypal_260_pi.urdf
index a093a8e..a5bdd3c 100644
--- a/mycobot_description/urdf/260_pi/mypal_260_pi.urdf
+++ b/mycobot_description/urdf/260_pi/mypal_260_pi.urdf
@@ -94,6 +94,7 @@
+
@@ -135,9 +136,9 @@
-
-
-
+
+
+
From 0b7cd5b2043b59ae8708586349b1578b3cea8af1 Mon Sep 17 00:00:00 2001
From: wangWking <842749351@qq.com>
Date: Tue, 10 May 2022 18:28:28 +0800
Subject: [PATCH 3/7] fix bug
---
.../mypalletizer_260_pi/config/mypal_260_pi.rviz | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mypalletizer_260/mypalletizer_260_pi/config/mypal_260_pi.rviz b/mypalletizer_260/mypalletizer_260_pi/config/mypal_260_pi.rviz
index 007a0cc..1af0496 100644
--- a/mypalletizer_260/mypalletizer_260_pi/config/mypal_260_pi.rviz
+++ b/mypalletizer_260/mypalletizer_260_pi/config/mypal_260_pi.rviz
@@ -7,6 +7,7 @@ Panels:
- /Global Options1
- /Status1
- /RobotModel1
+ - /RobotModel1/Status1
- /TF1
Splitter Ratio: 0.5
Tree Height: 645
@@ -170,10 +171,10 @@ Visualization Manager:
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.00999999978
- Pitch: 0.120398536
+ Pitch: 0.300398558
Target Frame:
Value: Orbit (rviz)
- Yaw: 2.79040861
+ Yaw: 1.56040955
Saved: ~
Window Geometry:
Displays:
From 2ab2be32ca282458fde71ec3e7558859238e46c9 Mon Sep 17 00:00:00 2001
From: wangWking <842749351@qq.com>
Date: Thu, 12 May 2022 16:30:25 +0800
Subject: [PATCH 4/7] update 260pi urdf
---
mycobot_description/urdf/260_pi/mypal_260_pi.urdf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mycobot_description/urdf/260_pi/mypal_260_pi.urdf b/mycobot_description/urdf/260_pi/mypal_260_pi.urdf
index a5bdd3c..6a15de3 100644
--- a/mycobot_description/urdf/260_pi/mypal_260_pi.urdf
+++ b/mycobot_description/urdf/260_pi/mypal_260_pi.urdf
@@ -130,7 +130,7 @@
-
+
From f316e6898c1719a227ac338e90e5a47bf0008dec Mon Sep 17 00:00:00 2001
From: wangWking <842749351@qq.com>
Date: Fri, 13 May 2022 09:17:05 +0800
Subject: [PATCH 5/7] add encoding=utf-8
---
mycobot_communication/scripts/mycobot_services.py | 1 +
mycobot_communication/scripts/mycobot_topics_jsnn.py | 0
mycobot_communication/scripts/mycobot_topics_pi.py | 0
mycobot_communication/scripts/mycobot_topics_seeed.py | 0
4 files changed, 1 insertion(+)
mode change 100644 => 100755 mycobot_communication/scripts/mycobot_topics_jsnn.py
mode change 100644 => 100755 mycobot_communication/scripts/mycobot_topics_pi.py
mode change 100644 => 100755 mycobot_communication/scripts/mycobot_topics_seeed.py
diff --git a/mycobot_communication/scripts/mycobot_services.py b/mycobot_communication/scripts/mycobot_services.py
index 27ebdc2..4a628fd 100755
--- a/mycobot_communication/scripts/mycobot_services.py
+++ b/mycobot_communication/scripts/mycobot_services.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python2
+# -*- coding:utf-8 -*-
import time
import rospy
from mycobot_communication.srv import *
diff --git a/mycobot_communication/scripts/mycobot_topics_jsnn.py b/mycobot_communication/scripts/mycobot_topics_jsnn.py
old mode 100644
new mode 100755
diff --git a/mycobot_communication/scripts/mycobot_topics_pi.py b/mycobot_communication/scripts/mycobot_topics_pi.py
old mode 100644
new mode 100755
diff --git a/mycobot_communication/scripts/mycobot_topics_seeed.py b/mycobot_communication/scripts/mycobot_topics_seeed.py
old mode 100644
new mode 100755
From 2962874024e09effdb1530f0dca9f3913b37c1b5 Mon Sep 17 00:00:00 2001
From: wangWking <842749351@qq.com>
Date: Fri, 13 May 2022 18:09:18 +0800
Subject: [PATCH 6/7] fix keyboard_control bug
---
mypalletizer_260/mypalletizer_260_pi/scripts/teleop_keyboard.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mypalletizer_260/mypalletizer_260_pi/scripts/teleop_keyboard.py b/mypalletizer_260/mypalletizer_260_pi/scripts/teleop_keyboard.py
index c712a80..bf0a6d2 100644
--- a/mypalletizer_260/mypalletizer_260_pi/scripts/teleop_keyboard.py
+++ b/mypalletizer_260/mypalletizer_260_pi/scripts/teleop_keyboard.py
@@ -139,8 +139,10 @@ def teleop_keyboard():
switch_gripper(False)
elif key == "1":
rsp = set_angles(*init_pose)
+ record_coords = [res.x, res.y, res.z, res.rx, speed, model]
elif key in "2":
rsp = set_angles(*home_pose)
+ record_coords = [res.x, res.y, res.z, res.rx, speed, model]
elif key in "3":
rep = get_angles()
home_pose[0] = rep.joint_1
From d4ccf6bc0f1091fb8775714bfbf5e89b3cabee86 Mon Sep 17 00:00:00 2001
From: wangWking <842749351@qq.com>
Date: Fri, 13 May 2022 18:11:24 +0800
Subject: [PATCH 7/7] fix keyboard_control bug
---
mypalletizer_260/mypalletizer_260/scripts/teleop_keyboard.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mypalletizer_260/mypalletizer_260/scripts/teleop_keyboard.py b/mypalletizer_260/mypalletizer_260/scripts/teleop_keyboard.py
index a2fdf82..a1ff7cb 100644
--- a/mypalletizer_260/mypalletizer_260/scripts/teleop_keyboard.py
+++ b/mypalletizer_260/mypalletizer_260/scripts/teleop_keyboard.py
@@ -138,8 +138,10 @@ def teleop_keyboard():
switch_gripper(False)
elif key == "1":
rsp = set_angles(*init_pose)
+ record_coords = [res.x, res.y, res.z, res.rx, speed, model]
elif key in "2":
rsp = set_angles(*home_pose)
+ record_coords = [res.x, res.y, res.z, res.rx, speed, model]
elif key in "3":
rep = get_angles()
home_pose[0] = rep.joint_1