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 diff --git a/mycobot_description/urdf/260_pi/mypal_260_pi.urdf b/mycobot_description/urdf/260_pi/mypal_260_pi.urdf index a093a8e..6a15de3 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 @@ + @@ -129,15 +130,15 @@ - + - - - + + + 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 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: 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) 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