mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-14 09:00:53 +00:00
integrate mycobot_320_moveit
This commit is contained in:
parent
a727b54682
commit
58815a485d
3 changed files with 4 additions and 20 deletions
|
|
@ -1,14 +1,11 @@
|
||||||
<launch>
|
<launch>
|
||||||
|
|
||||||
<!-- By default, we do not start a database (it can be large) -->
|
<!-- By default, we do not start a database (it can be large) -->
|
||||||
<!-- 默认情况下,我们不启动数据库(它可能很大) -->
|
|
||||||
<arg name="db" default="false" />
|
<arg name="db" default="false" />
|
||||||
<!-- Allow user to specify database location -->
|
<!-- Allow user to specify database location -->
|
||||||
<!-- 允许用户指定数据库位置 -->
|
|
||||||
<arg name="db_path" default="$(find mycobot_320_moveit)/default_warehouse_mongo_db" />
|
<arg name="db_path" default="$(find mycobot_320_moveit)/default_warehouse_mongo_db" />
|
||||||
|
|
||||||
<!-- By default, we are not in debug mode -->
|
<!-- By default, we are not in debug mode -->
|
||||||
<!-- 默认情况下,我们不处于调试模式 -->
|
|
||||||
<arg name="debug" default="false" />
|
<arg name="debug" default="false" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -22,7 +19,6 @@
|
||||||
<arg name="use_gui" default="false" />
|
<arg name="use_gui" default="false" />
|
||||||
|
|
||||||
<!-- Load the URDF, SRDF and other .yaml configuration files on the param server -->
|
<!-- Load the URDF, SRDF and other .yaml configuration files on the param server -->
|
||||||
<!-- 加载参数服务器上的URDF、SRDF等.yaml配置文件-->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/planning_context.launch">
|
<include file="$(find mycobot_320_moveit)/launch/planning_context.launch">
|
||||||
<arg name="load_robot_description" value="true"/>
|
<arg name="load_robot_description" value="true"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
@ -31,18 +27,15 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- We do not have a robot connected, so publish fake joint states -->
|
<!-- We do not have a robot connected, so publish fake joint states -->
|
||||||
<!-- 我们没有连接机器人,所以发布假关节状态 -->
|
|
||||||
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
|
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
|
||||||
<param name="use_gui" value="$(arg use_gui)"/>
|
<param name="use_gui" value="$(arg use_gui)"/>
|
||||||
<rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
|
<rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
|
||||||
</node>
|
</node>
|
||||||
|
|
||||||
<!-- Given the published joint states, publish tf for the robot links -->
|
<!-- Given the published joint states, publish tf for the robot links -->
|
||||||
<!-- 给定已发布的关节状态,为机器人链接发布 tf -->
|
|
||||||
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
|
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
|
||||||
|
|
||||||
<!-- Run the main MoveIt! executable without trajectory execution (we do not have controllers configured by default) -->
|
<!-- Run the main MoveIt! executable without trajectory execution (we do not have controllers configured by default) -->
|
||||||
<!-- 运行主MoveIt! 没有轨迹执行的可执行文件(我们默认没有配置控制器)-->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/move_group.launch">
|
<include file="$(find mycobot_320_moveit)/launch/move_group.launch">
|
||||||
<arg name="allow_trajectory_execution" value="true"/>
|
<arg name="allow_trajectory_execution" value="true"/>
|
||||||
<arg name="fake_execution" value="true"/>
|
<arg name="fake_execution" value="true"/>
|
||||||
|
|
@ -51,14 +44,12 @@
|
||||||
</include>
|
</include>
|
||||||
|
|
||||||
<!-- Run Rviz and load the default config to see the state of the move_group node -->
|
<!-- Run Rviz and load the default config to see the state of the move_group node -->
|
||||||
<!-- 运行 Rviz 并加载默认配置以查看 move_group 节点的状态 -->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/moveit_rviz.launch">
|
<include file="$(find mycobot_320_moveit)/launch/moveit_rviz.launch">
|
||||||
<arg name="config" value="true"/>
|
<arg name="config" value="true"/>
|
||||||
<arg name="debug" value="$(arg debug)"/>
|
<arg name="debug" value="$(arg debug)"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
||||||
<!-- If database loading was enabled, start mongodb as well -->
|
<!-- If database loading was enabled, start mongodb as well -->
|
||||||
<!-- 如果启用了数据库加载,也启动 mongodb -->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/default_warehouse_db.launch" if="$(arg db)">
|
<include file="$(find mycobot_320_moveit)/launch/default_warehouse_db.launch" if="$(arg db)">
|
||||||
<arg name="moveit_warehouse_database_path" value="$(arg db_path)"/>
|
<arg name="moveit_warehouse_database_path" value="$(arg db_path)"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
<launch>
|
<launch>
|
||||||
|
|
||||||
<!-- By default, we do not start a database (it can be large) -->
|
<!-- By default, we do not start a database (it can be large) -->
|
||||||
<!-- 默认情况下,我们不启动数据库(它可能很大) -->
|
|
||||||
<arg name="db" default="false" />
|
<arg name="db" default="false" />
|
||||||
<!-- Allow user to specify database location -->
|
<!-- Allow user to specify database location -->
|
||||||
<!-- 允许用户指定数据库位置 -->
|
|
||||||
<arg name="db_path" default="$(find mycobot_320_moveit)/default_warehouse_mongo_db" />
|
<arg name="db_path" default="$(find mycobot_320_moveit)/default_warehouse_mongo_db" />
|
||||||
|
|
||||||
<!-- By default, we are not in debug mode --> <!-- 默认情况下,我们不处于调试模式 -->
|
<!-- By default, we are not in debug mode -->
|
||||||
<arg name="debug" default="false" />
|
<arg name="debug" default="false" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -21,7 +19,6 @@
|
||||||
<arg name="use_gui" default="false" />
|
<arg name="use_gui" default="false" />
|
||||||
|
|
||||||
<!-- Load the URDF, SRDF and other .yaml configuration files on the param server -->
|
<!-- Load the URDF, SRDF and other .yaml configuration files on the param server -->
|
||||||
<!-- 加载参数服务器上的URDF、SRDF等.yaml配置文件-->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/planning_context.launch">
|
<include file="$(find mycobot_320_moveit)/launch/planning_context.launch">
|
||||||
<arg name="load_robot_description" value="true"/>
|
<arg name="load_robot_description" value="true"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
@ -30,18 +27,15 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- We do not have a robot connected, so publish fake joint states -->
|
<!-- We do not have a robot connected, so publish fake joint states -->
|
||||||
<!-- 我们没有连接机器人,所以发布假关节状态 -->
|
|
||||||
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
|
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
|
||||||
<param name="use_gui" value="$(arg use_gui)"/>
|
<param name="use_gui" value="$(arg use_gui)"/>
|
||||||
<rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
|
<rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
|
||||||
</node>
|
</node>
|
||||||
|
|
||||||
<!-- Given the published joint states, publish tf for the robot links -->
|
<!-- Given the published joint states, publish tf for the robot links -->
|
||||||
<!-- 给定已发布的关节状态,为机器人链接发布 tf -->
|
|
||||||
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
|
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
|
||||||
|
|
||||||
<!-- Run the main MoveIt! executable without trajectory execution (we do not have controllers configured by default) -->
|
<!-- Run the main MoveIt! executable without trajectory execution (we do not have controllers configured by default) -->
|
||||||
<!-- 运行主MoveIt! 没有轨迹执行的可执行文件(我们默认没有配置控制器)-->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/move_group.launch">
|
<include file="$(find mycobot_320_moveit)/launch/move_group.launch">
|
||||||
<arg name="allow_trajectory_execution" value="true"/>
|
<arg name="allow_trajectory_execution" value="true"/>
|
||||||
<arg name="fake_execution" value="true"/>
|
<arg name="fake_execution" value="true"/>
|
||||||
|
|
@ -50,14 +44,12 @@
|
||||||
</include>
|
</include>
|
||||||
|
|
||||||
<!-- Run Rviz and load the default config to see the state of the move_group node -->
|
<!-- Run Rviz and load the default config to see the state of the move_group node -->
|
||||||
<!-- 运行 Rviz 并加载默认配置以查看 move_group 节点的状态 -->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/moveit_rviz.launch">
|
<include file="$(find mycobot_320_moveit)/launch/moveit_rviz.launch">
|
||||||
<arg name="config" value="true"/>
|
<arg name="config" value="true"/>
|
||||||
<arg name="debug" value="$(arg debug)"/>
|
<arg name="debug" value="$(arg debug)"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
||||||
<!-- If database loading was enabled, start mongodb as well -->
|
<!-- If database loading was enabled, start mongodb as well -->
|
||||||
<!-- 如果启用了数据库加载,也启动 mongodb -->
|
|
||||||
<include file="$(find mycobot_320_moveit)/launch/default_warehouse_db.launch" if="$(arg db)">
|
<include file="$(find mycobot_320_moveit)/launch/default_warehouse_db.launch" if="$(arg db)">
|
||||||
<arg name="moveit_warehouse_database_path" value="$(arg db_path)"/>
|
<arg name="moveit_warehouse_database_path" value="$(arg db_path)"/>
|
||||||
</include>
|
</include>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ def listener():
|
||||||
shell=True)
|
shell=True)
|
||||||
|
|
||||||
port = rospy.get_param("~port", port)
|
port = rospy.get_param("~port", port)
|
||||||
baud = rospy.get_param("~baud", 1000000)
|
baud = rospy.get_param("~baud", 115200)
|
||||||
|
# 1000000
|
||||||
mc = MyCobot(port, baud)
|
mc = MyCobot(port, baud)
|
||||||
|
|
||||||
rospy.Subscriber("joint_states", JointState, callback)
|
rospy.Subscriber("joint_states", JointState, callback)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue