change package name.

This commit is contained in:
zachary 2021-05-06 12:37:06 +08:00
parent d30415b1bc
commit 2581131bbe
12 changed files with 41 additions and 41 deletions

View file

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.3)
project(myCobotROS)
project(mycobot_ros)
add_compile_options(-std=c++11)
## Find catkin and any catkin packages

View file

@ -1,4 +1,4 @@
# myCobotROS
# mycobot_ros
[![jaywcjlove/sb](https://jaywcjlove.github.io/sb/lang/chinese.svg)](READMEcn.md)
@ -46,7 +46,7 @@ This command does three things:
3) `docker-compose up ros`
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
@ -64,7 +64,7 @@ Install ros package in your src folder of your Catkin workspace.
```bash
$ cd ~/catkin_ws/src
$ git clone https://github.com/elephantrobotics/myCobotROS.git
$ git clone https://github.com/elephantrobotics/mycobot_ros.git
$ cd ~/catkin_ws
$ catkin_make
$ source ~/catkin_ws/devel/setup.bash
@ -73,7 +73,7 @@ $ source ~/catkin_ws/devel/setup.bash
#### 1.3 Test Python API
```bash
cd ~/catkin_ws/src/myCobotROS
cd ~/catkin_ws/src/mycobot_ros
python scripts/test.py
```
@ -109,13 +109,13 @@ python scripts/test.py
- launch ros and rviz
```
roslaunch myCobotROS control_slider.launch
roslaunch mycobot_ros control_slider.launch
```
- run python script
```
rosrun myCobotROS control_slider.py
rosrun mycobot_ros control_slider.py
```
- **The model moves with the real manipulator**
@ -123,13 +123,13 @@ python scripts/test.py
- launch ros and rviz
```
roslanuch myCobotROS mycobot.launch
roslanuch mycobot_ros mycobot.launch
```
- run python script
```
rosrun myCobotROS display.py
rosrun mycobot_ros display.py
```
- **Open the keyboard controller**
@ -137,13 +137,13 @@ python scripts/test.py
- 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
```
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:
@ -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.
```bash
rosrun rviz rviz -d rospack find myCobotROS/config/mycobot.rviz
rosrun rviz rviz -d rospack find mycobot_ros/config/mycobot.rviz
``` -->
## Q & A

View file

@ -1,4 +1,4 @@
# myCobotROS
# mycobot_ros
[![jaywcjlove/sb](https://jaywcjlove.github.io/sb/lang/english.svg)](README.md)
@ -33,7 +33,7 @@ pip install pymycobot --user
```bash
$ cd ~/catkin_ws/src
$ git clone https://github.com/elephantrobotics/myCobotROS.git
$ git clone https://github.com/elephantrobotics/mycobot_ros.git
$ cd ~/catkin_ws
$ catkin_make
```
@ -41,7 +41,7 @@ $ catkin_make
### 1.3 你可以选择测试 Python API
```bash
cd ~/catkin_ws/src/myCobotROS
cd ~/catkin_ws/src/mycobot_ros
python scripts/test.py
```
@ -77,13 +77,13 @@ python scripts/test.py
- 启动 ros 和 rviz
```
roslaunch myCobotROS control_slider.launch
roslaunch mycobot_ros control_slider.launch
```
- 运行 python 脚本
```
rosrun myCobotROS control_slider.py
rosrun mycobot_ros control_slider.py
```
- 仿真模型同步机械臂
@ -91,13 +91,13 @@ python scripts/test.py
- 启动 ros 和 rviz
```
roslanuch myCobotROS mycobot.launch
roslanuch mycobot_ros mycobot.launch
```
- 运行 python 脚本
```
rosrun myCobotROS display.py
rosrun mycobot_ros display.py
```
## Q & A

View file

@ -1,7 +1,7 @@
version: '3.4'
x-app: &common
command: [ "roslaunch myCobotROS control_slider.launch" ]
command: [ "roslaunch mycobot_ros control_slider.launch" ]
privileged: true
environment:
PYTHONUNBUFFERED: 1

View file

@ -3,7 +3,7 @@
<arg name="BAUD" default="115200" />
<!-- 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="baud" type="int" value="$(arg BAUD)" />
</node>

View file

@ -1,6 +1,6 @@
<launch>
<arg name="model" default="$(find myCobotROS)/urdf/mycobot_urdf.urdf"/>
<arg name="rvizconfig" default="$(find myCobotROS)/config/mycobot.rviz" />
<arg name="model" default="$(find mycobot_ros)/urdf/mycobot_urdf.urdf"/>
<arg name="rvizconfig" default="$(find mycobot_ros)/config/mycobot.rviz" />
<arg name="gui" default="true" />
<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> -->
</node>
<!-- 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 -->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
</launch>

View file

@ -1,6 +1,6 @@
<launch>
<arg name="model" default="$(find myCobotROS)/urdf/mycobot_urdf.urdf"/>
<arg name="rvizconfig" default="$(find myCobotROS)/config/mycobot.rviz" />
<arg name="model" default="$(find mycobot_ros)/urdf/mycobot_urdf.urdf"/>
<arg name="rvizconfig" default="$(find mycobot_ros)/config/mycobot.rviz" />
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />

View file

@ -2,8 +2,8 @@
<arg name="PORT" default="/dev/ttyUSB0" />
<arg name="BAUD" default="115200" />
<arg name="model" default="$(find myCobotROS)/urdf/mycobot_urdf.urdf"/>
<arg name="rvizconfig" default="$(find myCobotROS)/config/mycobot.rviz" />
<arg name="model" default="$(find mycobot_ros)/urdf/mycobot_urdf.urdf"/>
<arg name="rvizconfig" default="$(find mycobot_ros)/config/mycobot.rviz" />
<arg name="gui" default="false" />
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
@ -13,9 +13,9 @@
<!-- Show in Rviz -->
<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="BAUD" value="$(arg BAUD)" />
</include>
<node name="real_listener" pkg="myCobotROS" type="listen_real.py" />
<node name="real_listener" pkg="mycobot_ros" type="listen_real.py" />
</launch>

View file

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package format="2">
<name>myCobotROS</name>
<name>mycobot_ros</name>
<version>0.1.0</version>
<description>The myCobotROS package</description>
<description>The mycobot_ros package</description>
<maintainer email="lijun.zhang@elephantrobotics.com">ZhangLijun</maintainer>
<license>BSD</license>

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python2
import sys
import rospy
from myCobotROS.srv import *
from mycobot_ros.srv import *
def test():

View file

@ -11,7 +11,7 @@ import copy
import time
import roslib
roslib.load_manifest('myCobotROS')
roslib.load_manifest('mycobot_ros')
msg = """

View file

@ -8,7 +8,7 @@
<visual>
<geometry>
<!--- 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>
<origin xyz = "0.0 0 0 " rpy = " 0 0 -1.5708"/>
</visual>
@ -17,7 +17,7 @@
<link name="joint2">
<visual>
<geometry>
<mesh filename="package://myCobotROS/urdf/joint2.dae"/>
<mesh filename="package://mycobot_ros/urdf/joint2.dae"/>
</geometry>
<origin xyz = "0.0 0 -0.06096 " rpy = " 0 0 -1.5708"/>
</visual>
@ -28,7 +28,7 @@
<visual>
<geometry>
<mesh filename="package://myCobotROS/urdf/joint3.dae"/>
<mesh filename="package://mycobot_ros/urdf/joint3.dae"/>
</geometry>
<origin xyz = "0.0 0 0.03256 " rpy = " 0 -1.5708 0"/>
</visual>
@ -39,7 +39,7 @@
<visual>
<geometry>
<!--- 0.0 0 -0.04 -->
<mesh filename="package://myCobotROS/urdf/joint4.dae"/>
<mesh filename="package://mycobot_ros/urdf/joint4.dae"/>
</geometry>
<origin xyz = "0.0 0 0.03056 " rpy = " 0 -1.5708 0"/>
</visual>
@ -52,7 +52,7 @@
<visual>
<geometry>
<!--- 0.0 0 -0.04 -->
<mesh filename="package://myCobotROS/urdf/joint5.dae"/>
<mesh filename="package://mycobot_ros/urdf/joint5.dae"/>
</geometry>
<origin xyz = "0.0 0 -0.03356 " rpy = " 0 -1.5708 1.5708"/>
</visual>
@ -63,7 +63,7 @@
<visual>
<geometry>
<!--- 0.0 0 -0.04 -->
<mesh filename="package://myCobotROS/urdf/joint6.dae"/>
<mesh filename="package://mycobot_ros/urdf/joint6.dae"/>
</geometry>
<origin xyz = "0 0.00 -0.038 " rpy = " 0 0 0"/>
</visual>
@ -74,7 +74,7 @@
<visual>
<geometry>
<!--- 0.0 0 -0.04 -->
<mesh filename="package://myCobotROS/urdf/joint7.dae"/>
<mesh filename="package://mycobot_ros/urdf/joint7.dae"/>
</geometry>
<origin xyz = "0.0 0 -0.012 " rpy = " 0 0 0"/>
</visual>