mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
add aikit-320 ros
This commit is contained in:
parent
dd69b52bf6
commit
36af40a7f1
3 changed files with 12 additions and 5 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
<arg name="baud" default="115200" />
|
<arg name="baud" default="115200" />
|
||||||
|
|
||||||
<!-- Open communication service --><!-- 开启通讯服务 -->
|
<!-- 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="port" type="string" value="$(arg port)" />
|
||||||
<param name="baud" type="int" value="$(arg baud)" />
|
<param name="baud" type="int" value="$(arg baud)" />
|
||||||
</node>
|
</node>
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@ from mycobot_communication.msg import (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from pymycobot import MyCobotSocket
|
from pymycobot import MyCobot
|
||||||
|
|
||||||
|
|
||||||
class Watcher:
|
class Watcher:
|
||||||
"""this class solves two problems with multithreaded
|
"""this class solves two problems with multithreaded
|
||||||
|
|
@ -77,8 +76,7 @@ class MycobotTopics(object):
|
||||||
port = rospy.get_param("~port", "/dev/ttyAMA0")
|
port = rospy.get_param("~port", "/dev/ttyAMA0")
|
||||||
baud = rospy.get_param("~baud", 115200)
|
baud = rospy.get_param("~baud", 115200)
|
||||||
rospy.loginfo("%s,%s" % (port, baud))
|
rospy.loginfo("%s,%s" % (port, baud))
|
||||||
self.mc = MyCobotSocket(port, baud) # port
|
self.mc = MyCobot(port, baud) # port
|
||||||
self.mc.connect() #pi
|
|
||||||
self.lock = threading.Lock()
|
self.lock = threading.Lock()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ Panels:
|
||||||
- /RobotModel1
|
- /RobotModel1
|
||||||
- /TF1
|
- /TF1
|
||||||
- /TF1/Tree1
|
- /TF1/Tree1
|
||||||
|
- /Marker1
|
||||||
Splitter Ratio: 0.5
|
Splitter Ratio: 0.5
|
||||||
Tree Height: 603
|
Tree Height: 603
|
||||||
- Class: rviz/Selection
|
- Class: rviz/Selection
|
||||||
|
|
@ -152,6 +153,14 @@ Visualization Manager:
|
||||||
{}
|
{}
|
||||||
Update Interval: 0
|
Update Interval: 0
|
||||||
Value: true
|
Value: true
|
||||||
|
- Class: rviz/Marker
|
||||||
|
Enabled: true
|
||||||
|
Marker Topic: cube
|
||||||
|
Name: Marker
|
||||||
|
Namespaces:
|
||||||
|
{}
|
||||||
|
Queue Size: 100
|
||||||
|
Value: true
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Global Options:
|
Global Options:
|
||||||
Background Color: 48; 48; 48
|
Background Color: 48; 48; 48
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue