From cda88989906cf420391669e8b29044f97f5fbc62 Mon Sep 17 00:00:00 2001 From: wuchangji Date: Fri, 24 Jun 2022 18:46:15 +0800 Subject: [PATCH] optimize --- .../config/mypal_260_pi.rviz | 38 ++++++++++--------- .../scripts/listen_real.py | 1 - .../scripts/listen_real_of_topic.py | 6 +-- 3 files changed, 24 insertions(+), 21 deletions(-) mode change 100644 => 100755 mypalletizer_260/mypalletizer_260_pi/scripts/listen_real_of_topic.py 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 1af0496..cc4a283 100644 --- a/mypalletizer_260/mypalletizer_260_pi/config/mypal_260_pi.rviz +++ b/mypalletizer_260/mypalletizer_260_pi/config/mypal_260_pi.rviz @@ -7,10 +7,9 @@ Panels: - /Global Options1 - /Status1 - /RobotModel1 - - /RobotModel1/Status1 - /TF1 Splitter Ratio: 0.5 - Tree Height: 645 + Tree Height: 601 - Class: rviz/Selection Name: Selection - Class: rviz/Tool Properties @@ -19,7 +18,7 @@ Panels: - /2D Nav Goal1 - /Publish Point1 Name: Tool Properties - Splitter Ratio: 0.588679016 + Splitter Ratio: 0.5886790156364441 - Class: rviz/Views Expanded: - /Current View1 @@ -30,6 +29,8 @@ Panels: Name: Time SyncMode: 0 SyncSource: "" +Preferences: + PromptSaveOnExit: true Toolbars: toolButtonStyle: 2 Visualization Manager: @@ -41,7 +42,7 @@ Visualization Manager: Color: 160; 160; 164 Enabled: true Line Style: - Line Width: 0.0299999993 + Line Width: 0.029999999329447746 Value: Lines Name: Grid Normal Cell Count: 0 @@ -116,7 +117,7 @@ Visualization Manager: Value: true link5: Value: true - Marker Scale: 0.300000012 + Marker Scale: 0.30000001192092896 Name: TF Show Arrows: true Show Axes: true @@ -146,7 +147,10 @@ Visualization Manager: - Class: rviz/FocusCamera - Class: rviz/Measure - Class: rviz/SetInitialPose + Theta std deviation: 0.2617993950843811 Topic: /initialpose + X std deviation: 0.5 + Y std deviation: 0.5 - Class: rviz/SetGoal Topic: /move_base_simple/goal - Class: rviz/PublishPoint @@ -156,33 +160,33 @@ Visualization Manager: Views: Current: Class: rviz/Orbit - Distance: 1.20289087 + Distance: 1.2028908729553223 Enable Stereo Rendering: - Stereo Eye Separation: 0.0599999987 + Stereo Eye Separation: 0.05999999865889549 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: X: 0 Y: 0 - Z: 0.107583851 + Z: 0.10758385062217712 Focal Shape Fixed Size: true - Focal Shape Size: 0.0500000007 + Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View - Near Clip Distance: 0.00999999978 - Pitch: 0.300398558 + Near Clip Distance: 0.009999999776482582 + Pitch: 0.42039862275123596 Target Frame: Value: Orbit (rviz) - Yaw: 1.56040955 + Yaw: 1.1754094362258911 Saved: ~ Window Geometry: Displays: collapsed: false - Height: 926 + Height: 892 Hide Left Dock: false Hide Right Dock: false - QMainWindow State: 000000ff00000000fd00000004000000000000016a00000314fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002800000314000000d700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000022f00000314fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000002800000314000000ad00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000073f0000003efc0100000002fb0000000800540069006d006501000000000000073f0000030000fffffffb0000000800540069006d006501000000000000045000000000000000000000039a0000031400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + QMainWindow State: 000000ff00000000fd00000004000000000000016a000002e2fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000002e2000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c0000026100000001000001a4000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b000002e2000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006200000003efc0100000002fb0000000800540069006d00650100000000000006200000024400fffffffb0000000800540069006d0065010000000000000450000000000000000000000306000002e200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Selection: collapsed: false Time: @@ -191,6 +195,6 @@ Window Geometry: collapsed: false Views: collapsed: false - Width: 1855 - X: 65 - Y: 24 + Width: 1568 + X: 144 + Y: 41 diff --git a/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real.py b/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real.py index cd93e2b..e7792f9 100644 --- a/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real.py +++ b/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real.py @@ -7,7 +7,6 @@ import math import rospy from sensor_msgs.msg import JointState from std_msgs.msg import Header -# from mycobot_communication.srv import GetAngles from mypalletizer_communication.srv import GetAngles # from pymycobot.mypalletizer import MyPalletizer diff --git a/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real_of_topic.py b/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real_of_topic.py old mode 100644 new mode 100755 index 2b9e405..758d472 --- a/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real_of_topic.py +++ b/mypalletizer_260/mypalletizer_260_pi/scripts/listen_real_of_topic.py @@ -5,7 +5,6 @@ import math import rospy from sensor_msgs.msg import JointState from std_msgs.msg import Header -# from mycobot_communication.msg import MycobotAngles from mypalletizer_communication.msg import MypalAngles @@ -22,10 +21,10 @@ class Listener(object): rospy.spin() def callback(self, data): - """`mycobot/angles_real` subscriber callback method. + """`mypal260pi/angles_real` subscriber callback method. Args: - data (MycobotAngles): callback argument. + data (mypal260piAngles): callback argument. """ # ini publisher object. # 初始化发布者对象 @@ -50,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),