add aikit-320 ros

This commit is contained in:
weijian 2023-06-13 14:00:28 +08:00
parent dd69b52bf6
commit 36af40a7f1
3 changed files with 12 additions and 5 deletions

View file

@ -4,7 +4,7 @@
<arg name="baud" default="115200" />
<!-- Open communication service --><!-- 开启通讯服务 -->
<node name="mycobot_services" pkg="mycobot_communication" type="mycobot_topics_pi.py" output="screen">
<node name="mycobot_services" pkg="mycobot_320_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>

View file

@ -19,8 +19,7 @@ from mycobot_communication.msg import (
from pymycobot import MyCobotSocket
from pymycobot import MyCobot
class Watcher:
"""this class solves two problems with multithreaded
@ -77,8 +76,7 @@ class MycobotTopics(object):
port = rospy.get_param("~port", "/dev/ttyAMA0")
baud = rospy.get_param("~baud", 115200)
rospy.loginfo("%s,%s" % (port, baud))
self.mc = MyCobotSocket(port, baud) # port
self.mc.connect() #pi
self.mc = MyCobot(port, baud) # port
self.lock = threading.Lock()
def start(self):

View file

@ -9,6 +9,7 @@ Panels:
- /RobotModel1
- /TF1
- /TF1/Tree1
- /Marker1
Splitter Ratio: 0.5
Tree Height: 603
- Class: rviz/Selection
@ -152,6 +153,14 @@ Visualization Manager:
{}
Update Interval: 0
Value: true
- Class: rviz/Marker
Enabled: true
Marker Topic: cube
Name: Marker
Namespaces:
{}
Queue Size: 100
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48