mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
change package name.
This commit is contained in:
parent
d30415b1bc
commit
2581131bbe
12 changed files with 41 additions and 41 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 2.8.3)
|
cmake_minimum_required(VERSION 2.8.3)
|
||||||
project(myCobotROS)
|
project(mycobot_ros)
|
||||||
add_compile_options(-std=c++11)
|
add_compile_options(-std=c++11)
|
||||||
|
|
||||||
## Find catkin and any catkin packages
|
## Find catkin and any catkin packages
|
||||||
|
|
|
||||||
22
README.md
22
README.md
|
|
@ -1,4 +1,4 @@
|
||||||
# myCobotROS
|
# mycobot_ros
|
||||||
|
|
||||||
[](READMEcn.md)
|
[](READMEcn.md)
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ This command does three things:
|
||||||
3) `docker-compose up ros`
|
3) `docker-compose up ros`
|
||||||
|
|
||||||
This runs the image specified in the `docker-compose.yml`, which by default runs
|
This runs the image specified in the `docker-compose.yml`, which by default runs
|
||||||
the command `roslaunch myCobotROS control_slider.launch` within the container.
|
the command `roslaunch mycobot_ros control_slider.launch` within the container.
|
||||||
|
|
||||||
|
|
||||||
### Option 2: Local
|
### Option 2: Local
|
||||||
|
|
@ -64,7 +64,7 @@ Install ros package in your src folder of your Catkin workspace.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd ~/catkin_ws/src
|
$ cd ~/catkin_ws/src
|
||||||
$ git clone https://github.com/elephantrobotics/myCobotROS.git
|
$ git clone https://github.com/elephantrobotics/mycobot_ros.git
|
||||||
$ cd ~/catkin_ws
|
$ cd ~/catkin_ws
|
||||||
$ catkin_make
|
$ catkin_make
|
||||||
$ source ~/catkin_ws/devel/setup.bash
|
$ source ~/catkin_ws/devel/setup.bash
|
||||||
|
|
@ -73,7 +73,7 @@ $ source ~/catkin_ws/devel/setup.bash
|
||||||
#### 1.3 Test Python API
|
#### 1.3 Test Python API
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/catkin_ws/src/myCobotROS
|
cd ~/catkin_ws/src/mycobot_ros
|
||||||
python scripts/test.py
|
python scripts/test.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -109,13 +109,13 @@ python scripts/test.py
|
||||||
- launch ros and rviz
|
- launch ros and rviz
|
||||||
|
|
||||||
```
|
```
|
||||||
roslaunch myCobotROS control_slider.launch
|
roslaunch mycobot_ros control_slider.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
- run python script
|
- run python script
|
||||||
|
|
||||||
```
|
```
|
||||||
rosrun myCobotROS control_slider.py
|
rosrun mycobot_ros control_slider.py
|
||||||
```
|
```
|
||||||
|
|
||||||
- **The model moves with the real manipulator**
|
- **The model moves with the real manipulator**
|
||||||
|
|
@ -123,13 +123,13 @@ python scripts/test.py
|
||||||
- launch ros and rviz
|
- launch ros and rviz
|
||||||
|
|
||||||
```
|
```
|
||||||
roslanuch myCobotROS mycobot.launch
|
roslanuch mycobot_ros mycobot.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
- run python script
|
- run python script
|
||||||
|
|
||||||
```
|
```
|
||||||
rosrun myCobotROS display.py
|
rosrun mycobot_ros display.py
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Open the keyboard controller**
|
- **Open the keyboard controller**
|
||||||
|
|
@ -137,13 +137,13 @@ python scripts/test.py
|
||||||
- launch
|
- launch
|
||||||
|
|
||||||
```
|
```
|
||||||
roslaunch myCobotROS mycobot_teleop_keyboard.launch PORT:=/dev/ttyUSB0
|
roslaunch mycobot_ros mycobot_teleop_keyboard.launch PORT:=/dev/ttyUSB0
|
||||||
```
|
```
|
||||||
|
|
||||||
- open another terminal run script
|
- open another terminal run script
|
||||||
|
|
||||||
```
|
```
|
||||||
rosrun myCobotROS teleop_keyboard.py _speed:=60 _change_size:=10
|
rosrun mycobot_ros teleop_keyboard.py _speed:=60 _change_size:=10
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you will see this:
|
Then you will see this:
|
||||||
|
|
@ -175,7 +175,7 @@ python scripts/test.py
|
||||||
<!-- If you use the above command, then you may need to manually add some model components. If you don't want to be so troublesome, you can use the following command to load a saved **myCobot** model.
|
<!-- If you use the above command, then you may need to manually add some model components. If you don't want to be so troublesome, you can use the following command to load a saved **myCobot** model.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rosrun rviz rviz -d rospack find myCobotROS/config/mycobot.rviz
|
rosrun rviz rviz -d rospack find mycobot_ros/config/mycobot.rviz
|
||||||
``` -->
|
``` -->
|
||||||
|
|
||||||
## Q & A
|
## Q & A
|
||||||
|
|
|
||||||
14
READMEcn.md
14
READMEcn.md
|
|
@ -1,4 +1,4 @@
|
||||||
# myCobotROS
|
# mycobot_ros
|
||||||
|
|
||||||
[](README.md)
|
[](README.md)
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ pip install pymycobot --user
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd ~/catkin_ws/src
|
$ cd ~/catkin_ws/src
|
||||||
$ git clone https://github.com/elephantrobotics/myCobotROS.git
|
$ git clone https://github.com/elephantrobotics/mycobot_ros.git
|
||||||
$ cd ~/catkin_ws
|
$ cd ~/catkin_ws
|
||||||
$ catkin_make
|
$ catkin_make
|
||||||
```
|
```
|
||||||
|
|
@ -41,7 +41,7 @@ $ catkin_make
|
||||||
### 1.3 你可以选择测试 Python API
|
### 1.3 你可以选择测试 Python API
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/catkin_ws/src/myCobotROS
|
cd ~/catkin_ws/src/mycobot_ros
|
||||||
python scripts/test.py
|
python scripts/test.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -77,13 +77,13 @@ python scripts/test.py
|
||||||
- 启动 ros 和 rviz
|
- 启动 ros 和 rviz
|
||||||
|
|
||||||
```
|
```
|
||||||
roslaunch myCobotROS control_slider.launch
|
roslaunch mycobot_ros control_slider.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
- 运行 python 脚本
|
- 运行 python 脚本
|
||||||
|
|
||||||
```
|
```
|
||||||
rosrun myCobotROS control_slider.py
|
rosrun mycobot_ros control_slider.py
|
||||||
```
|
```
|
||||||
|
|
||||||
- 仿真模型同步机械臂
|
- 仿真模型同步机械臂
|
||||||
|
|
@ -91,13 +91,13 @@ python scripts/test.py
|
||||||
- 启动 ros 和 rviz
|
- 启动 ros 和 rviz
|
||||||
|
|
||||||
```
|
```
|
||||||
roslanuch myCobotROS mycobot.launch
|
roslanuch mycobot_ros mycobot.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
- 运行 python 脚本
|
- 运行 python 脚本
|
||||||
|
|
||||||
```
|
```
|
||||||
rosrun myCobotROS display.py
|
rosrun mycobot_ros display.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Q & A
|
## Q & A
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: '3.4'
|
version: '3.4'
|
||||||
|
|
||||||
x-app: &common
|
x-app: &common
|
||||||
command: [ "roslaunch myCobotROS control_slider.launch" ]
|
command: [ "roslaunch mycobot_ros control_slider.launch" ]
|
||||||
privileged: true
|
privileged: true
|
||||||
environment:
|
environment:
|
||||||
PYTHONUNBUFFERED: 1
|
PYTHONUNBUFFERED: 1
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<arg name="BAUD" default="115200" />
|
<arg name="BAUD" default="115200" />
|
||||||
|
|
||||||
<!-- Open communication service -->
|
<!-- Open communication service -->
|
||||||
<node name="mycobot_services" pkg="myCobotROS" type="mycobot_ros.py" output="screen">
|
<node name="mycobot_services" pkg="mycobot_ros" type="mycobot_ros.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>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<launch>
|
<launch>
|
||||||
<arg name="model" default="$(find myCobotROS)/urdf/mycobot_urdf.urdf"/>
|
<arg name="model" default="$(find mycobot_ros)/urdf/mycobot_urdf.urdf"/>
|
||||||
<arg name="rvizconfig" default="$(find myCobotROS)/config/mycobot.rviz" />
|
<arg name="rvizconfig" default="$(find mycobot_ros)/config/mycobot.rviz" />
|
||||||
<arg name="gui" default="true" />
|
<arg name="gui" default="true" />
|
||||||
|
|
||||||
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
|
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<!-- <rosparam param="source_list" subst_value="true">["joint_states"]</rosparam> -->
|
<!-- <rosparam param="source_list" subst_value="true">["joint_states"]</rosparam> -->
|
||||||
</node>
|
</node>
|
||||||
<!-- Open control script -->
|
<!-- Open control script -->
|
||||||
<node name="control_slider" pkg="myCobotROS" type="control_slider.py"/>
|
<node name="control_slider" pkg="mycobot_ros" type="control_slider.py"/>
|
||||||
<!-- Show in Rviz -->
|
<!-- Show in Rviz -->
|
||||||
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
|
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
|
||||||
</launch>
|
</launch>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<launch>
|
<launch>
|
||||||
<arg name="model" default="$(find myCobotROS)/urdf/mycobot_urdf.urdf"/>
|
<arg name="model" default="$(find mycobot_ros)/urdf/mycobot_urdf.urdf"/>
|
||||||
<arg name="rvizconfig" default="$(find myCobotROS)/config/mycobot.rviz" />
|
<arg name="rvizconfig" default="$(find mycobot_ros)/config/mycobot.rviz" />
|
||||||
|
|
||||||
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
|
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
<arg name="PORT" default="/dev/ttyUSB0" />
|
<arg name="PORT" default="/dev/ttyUSB0" />
|
||||||
<arg name="BAUD" default="115200" />
|
<arg name="BAUD" default="115200" />
|
||||||
|
|
||||||
<arg name="model" default="$(find myCobotROS)/urdf/mycobot_urdf.urdf"/>
|
<arg name="model" default="$(find mycobot_ros)/urdf/mycobot_urdf.urdf"/>
|
||||||
<arg name="rvizconfig" default="$(find myCobotROS)/config/mycobot.rviz" />
|
<arg name="rvizconfig" default="$(find mycobot_ros)/config/mycobot.rviz" />
|
||||||
<arg name="gui" default="false" />
|
<arg name="gui" default="false" />
|
||||||
|
|
||||||
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
|
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
<!-- Show in Rviz -->
|
<!-- Show in Rviz -->
|
||||||
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
|
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
|
||||||
|
|
||||||
<include file="$(find myCobotROS)/launch/communication_service.launch">
|
<include file="$(find mycobot_ros)/launch/communication_service.launch">
|
||||||
<arg name="PORT" value="$(arg PORT)" />
|
<arg name="PORT" value="$(arg PORT)" />
|
||||||
<arg name="BAUD" value="$(arg BAUD)" />
|
<arg name="BAUD" value="$(arg BAUD)" />
|
||||||
</include>
|
</include>
|
||||||
<node name="real_listener" pkg="myCobotROS" type="listen_real.py" />
|
<node name="real_listener" pkg="mycobot_ros" type="listen_real.py" />
|
||||||
</launch>
|
</launch>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<package format="2">
|
<package format="2">
|
||||||
<name>myCobotROS</name>
|
<name>mycobot_ros</name>
|
||||||
<version>0.1.0</version>
|
<version>0.1.0</version>
|
||||||
<description>The myCobotROS package</description>
|
<description>The mycobot_ros package</description>
|
||||||
|
|
||||||
<maintainer email="lijun.zhang@elephantrobotics.com">ZhangLijun</maintainer>
|
<maintainer email="lijun.zhang@elephantrobotics.com">ZhangLijun</maintainer>
|
||||||
<license>BSD</license>
|
<license>BSD</license>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
import sys
|
import sys
|
||||||
import rospy
|
import rospy
|
||||||
from myCobotROS.srv import *
|
from mycobot_ros.srv import *
|
||||||
|
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import copy
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import roslib
|
import roslib
|
||||||
roslib.load_manifest('myCobotROS')
|
roslib.load_manifest('mycobot_ros')
|
||||||
|
|
||||||
|
|
||||||
msg = """
|
msg = """
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<visual>
|
<visual>
|
||||||
<geometry>
|
<geometry>
|
||||||
<!--- 0.0 0 -0.04 1.5708 3.14159-->
|
<!--- 0.0 0 -0.04 1.5708 3.14159-->
|
||||||
<mesh filename="package://myCobotROS/urdf/joint1.dae"/>
|
<mesh filename="package://mycobot_ros/urdf/joint1.dae"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<origin xyz = "0.0 0 0 " rpy = " 0 0 -1.5708"/>
|
<origin xyz = "0.0 0 0 " rpy = " 0 0 -1.5708"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<link name="joint2">
|
<link name="joint2">
|
||||||
<visual>
|
<visual>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="package://myCobotROS/urdf/joint2.dae"/>
|
<mesh filename="package://mycobot_ros/urdf/joint2.dae"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<origin xyz = "0.0 0 -0.06096 " rpy = " 0 0 -1.5708"/>
|
<origin xyz = "0.0 0 -0.06096 " rpy = " 0 0 -1.5708"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<visual>
|
<visual>
|
||||||
<geometry>
|
<geometry>
|
||||||
|
|
||||||
<mesh filename="package://myCobotROS/urdf/joint3.dae"/>
|
<mesh filename="package://mycobot_ros/urdf/joint3.dae"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<origin xyz = "0.0 0 0.03256 " rpy = " 0 -1.5708 0"/>
|
<origin xyz = "0.0 0 0.03256 " rpy = " 0 -1.5708 0"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<visual>
|
<visual>
|
||||||
<geometry>
|
<geometry>
|
||||||
<!--- 0.0 0 -0.04 -->
|
<!--- 0.0 0 -0.04 -->
|
||||||
<mesh filename="package://myCobotROS/urdf/joint4.dae"/>
|
<mesh filename="package://mycobot_ros/urdf/joint4.dae"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<origin xyz = "0.0 0 0.03056 " rpy = " 0 -1.5708 0"/>
|
<origin xyz = "0.0 0 0.03056 " rpy = " 0 -1.5708 0"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
<visual>
|
<visual>
|
||||||
<geometry>
|
<geometry>
|
||||||
<!--- 0.0 0 -0.04 -->
|
<!--- 0.0 0 -0.04 -->
|
||||||
<mesh filename="package://myCobotROS/urdf/joint5.dae"/>
|
<mesh filename="package://mycobot_ros/urdf/joint5.dae"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<origin xyz = "0.0 0 -0.03356 " rpy = " 0 -1.5708 1.5708"/>
|
<origin xyz = "0.0 0 -0.03356 " rpy = " 0 -1.5708 1.5708"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
<visual>
|
<visual>
|
||||||
<geometry>
|
<geometry>
|
||||||
<!--- 0.0 0 -0.04 -->
|
<!--- 0.0 0 -0.04 -->
|
||||||
<mesh filename="package://myCobotROS/urdf/joint6.dae"/>
|
<mesh filename="package://mycobot_ros/urdf/joint6.dae"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<origin xyz = "0 0.00 -0.038 " rpy = " 0 0 0"/>
|
<origin xyz = "0 0.00 -0.038 " rpy = " 0 0 0"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
<visual>
|
<visual>
|
||||||
<geometry>
|
<geometry>
|
||||||
<!--- 0.0 0 -0.04 -->
|
<!--- 0.0 0 -0.04 -->
|
||||||
<mesh filename="package://myCobotROS/urdf/joint7.dae"/>
|
<mesh filename="package://mycobot_ros/urdf/joint7.dae"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<origin xyz = "0.0 0 -0.012 " rpy = " 0 0 0"/>
|
<origin xyz = "0.0 0 -0.012 " rpy = " 0 0 0"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue