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
cda8898990
commit
ffb5a5eb68
4 changed files with 6 additions and 6 deletions
|
|
@ -1,9 +1,9 @@
|
|||
<launch>
|
||||
<arg name="port" default="/dev/ttyAMA0" />
|
||||
<arg name="baud" default="1000000" />
|
||||
<arg name="port" default="/dev/ttyUSB0" />
|
||||
<arg name="baud" default="115200" />
|
||||
|
||||
<!-- Open communication service -->
|
||||
<node name="mypalletizer_pi_services" pkg="mypalletizer_communication" type="mypal_topics_pi.py" output="screen">
|
||||
<node name="mycobot_services" pkg="mycobot_communication" type="mycobot_topics_pi.py" output="screen">
|
||||
<param name="port" type="string" value="$(arg port)" />
|
||||
<param name="baud" type="int" value="$(arg baud)" />
|
||||
</node>
|
||||
|
|
|
|||
0
mypalletizer_260/mypalletizer_communication/scripts/mypal_services.py
Executable file → Normal file
0
mypalletizer_260/mypalletizer_communication/scripts/mypal_services.py
Executable file → Normal file
2
mypalletizer_260/mypalletizer_communication/scripts/mypal_topics.py
Executable file → Normal file
2
mypalletizer_260/mypalletizer_communication/scripts/mypal_topics.py
Executable file → Normal file
|
|
@ -9,7 +9,7 @@ import threading
|
|||
import rospy
|
||||
from pymycobot.mypalletizer import MyPalletizer
|
||||
|
||||
from mypalletizer_communication.msg import(
|
||||
from mypalletizer_communication import(
|
||||
MypalAngles,
|
||||
MypalCoords,
|
||||
MypalSetAngles,
|
||||
|
|
|
|||
4
mypalletizer_260/mypalletizer_communication/scripts/mypal_topics_seeed.py
Executable file → Normal file
4
mypalletizer_260/mypalletizer_communication/scripts/mypal_topics_seeed.py
Executable file → Normal file
|
|
@ -70,8 +70,8 @@ class MypalTopics(object):
|
|||
rospy.init_node("Mypal_topics")
|
||||
rospy.loginfo("start ...")
|
||||
# problem
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA0")
|
||||
baud = rospy.get_param("~baud", 1000000)
|
||||
port = rospy.get_param("~port", "/dev/ttyUSB0")
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
rospy.loginfo("%s,%s" % (port, baud))
|
||||
self.mc = MyPalletizer(port,baud)
|
||||
self.lock = threading.Lock()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue