mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
update serial name
This commit is contained in:
parent
a3f45ad52c
commit
cc1b3f36ee
11 changed files with 15 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<launch>
|
||||
<!-- Select connecting device and serial port ,选择连接设备及串口-->
|
||||
<arg name="port" default="/dev/ttyAMA0" />
|
||||
<arg name="port" default="/dev/ttyAMA1" />
|
||||
<arg name="baud" default="115200" />
|
||||
|
||||
<arg name="model" default="$(find mycobot_description)/urdf/cobotx_a450/cobotx_a450.urdf"/>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<launch>
|
||||
<!-- Select connecting device and serial port ,选择连接设备及串口-->
|
||||
<arg name="port" default="/dev/ttyAMA0" />
|
||||
<arg name="port" default="/dev/ttyAMA1" />
|
||||
<arg name="baud" default="115200" />
|
||||
|
||||
<arg name="model" default="$(find mycobot_description)/urdf/cobotx_a450/cobotx_a450.urdf"/>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ def talker():
|
|||
rospy.init_node("display", anonymous=True)
|
||||
|
||||
print("Try connect real CobotX...")
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA0")
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA1")
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
print("port: {}, baud: {}\n".format(port, baud))
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ This file obtains the joint angle of the manipulator in ROS,
|
|||
and then sends it directly to the real manipulator using `pymycobot` API.
|
||||
This file is [slider_control.launch] related script.
|
||||
Passable parameters:
|
||||
port: serial prot string. Defaults is '/dev/ttyUSB0'
|
||||
port: serial prot string. Defaults is '/dev/ttyAMA1'
|
||||
baud: serial prot baudrate. Defaults is 115200.
|
||||
"""
|
||||
import math
|
||||
|
|
@ -36,7 +36,7 @@ def listener():
|
|||
rospy.init_node("control_slider", anonymous=True)
|
||||
|
||||
rospy.Subscriber("joint_states", JointState, callback)
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA0")
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA1")
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
print(port, baud)
|
||||
mc = CobotX(port, baud)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import print_function
|
||||
from cobotx_a450_communication.srv import GetCoords, SetCoords, GetAngles, SetAngles, GripperStatus
|
||||
import rospy
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<launch>
|
||||
<!-- Select connecting device and serial port ,选择连接设备及串口-->
|
||||
|
||||
<arg name="port" default="/dev/ttyAMA0" />
|
||||
<arg name="port" default="/dev/ttyAMA1" />
|
||||
<arg name="baud" default="115200" />
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<launch>
|
||||
<!-- Select connecting device and serial port ,选择连接设备及串口-->
|
||||
<arg name="port" default="/dev/ttyAMA0" />
|
||||
<arg name="port" default="/dev/ttyAMA1" />
|
||||
<arg name="baud" default="115200" />
|
||||
|
||||
<!-- Open communication service,开启通讯服务 -->
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<launch>
|
||||
<!-- Select connecting device and serial port ,选择连接设备及串口-->
|
||||
<arg name="port" default="/dev/ttyAMA0" />
|
||||
<arg name="port" default="/dev/ttyAMA1" />
|
||||
<arg name="baud" default="115200" />
|
||||
|
||||
<!-- Open communication service --><!-- 开启通讯服务 -->
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ class CobotXTopics(object):
|
|||
|
||||
rospy.init_node("cobotx_topics")
|
||||
rospy.loginfo("start ...")
|
||||
port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1])
|
||||
# port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1])
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA1")
|
||||
if not port:
|
||||
port = rospy.get_param("~port", os.popen("ls /dev/ttyACM*").readline()[:-1])
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ class CobotXTopics(object):
|
|||
rospy.init_node("cobotx_topics_pi")
|
||||
rospy.loginfo("start ...")
|
||||
# problem
|
||||
port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1])
|
||||
# port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1])
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA1")
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
rospy.loginfo("%s,%s" % (port, baud))
|
||||
self.mc = CobotX(port, baud)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ This file obtains the joint angle of the manipulator in ROS,
|
|||
and then sends it directly to the real manipulator using `pymycobot` API.
|
||||
This file is [slider_control.launch] related script.
|
||||
Passable parameters:
|
||||
port: serial prot string. Defaults is '/dev/ttyAMA0'
|
||||
port: serial prot string. Defaults is '/dev/ttyAMA1'
|
||||
baud: serial prot baudrate. Defaults is 115200.
|
||||
"""
|
||||
import math
|
||||
|
|
@ -37,7 +37,7 @@ def listener():
|
|||
rospy.init_node("control_slider", anonymous=True)
|
||||
|
||||
rospy.Subscriber("joint_states", JointState, callback)
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA0")
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA1")
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
print(port, baud)
|
||||
mc = CobotX(port, baud)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue