diff --git a/Pictures/Service_one.png b/Pictures/Service_one.png new file mode 100644 index 0000000..1038291 Binary files /dev/null and b/Pictures/Service_one.png differ diff --git a/Pictures/Service_two.png b/Pictures/Service_two.png new file mode 100644 index 0000000..dca1091 Binary files /dev/null and b/Pictures/Service_two.png differ diff --git a/Pictures/Topic_Newsletter_one.png b/Pictures/Topic_Newsletter_one.png new file mode 100644 index 0000000..a2d911c Binary files /dev/null and b/Pictures/Topic_Newsletter_one.png differ diff --git a/Pictures/Topic_Newsletter_two.png b/Pictures/Topic_Newsletter_two.png new file mode 100644 index 0000000..506acce Binary files /dev/null and b/Pictures/Topic_Newsletter_two.png differ diff --git a/README.md b/README.md index f704c68..d92676c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ #

ROS_Learn

## 实验一 ### ROS-noetic安装,应用于Ubuntu20.04lts
注:最好全程使用root权限 -#### 1.切换ubuntu软件源,访问清华源来提升下载速度。 +切换ubuntu软件源,访问清华源来提升下载速度。 ```c sudo vim /etc/apt/sources.list # 进入apt下载源文件 ``` @@ -24,6 +24,7 @@ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse ``` vim中按`Esc`退出编辑模式,按`Shift+;`进入命令输入模式输入`wq`保存退出。
+
在命令行中输入下列命令添加ROS源地址。 ```c sudo sh -c 'echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros-latest.list' @@ -73,7 +74,7 @@ chmod +x /路径 # 将文件/文件夹可编辑权限赋予某用户 sudo chown -R 用户名:用户名 /路径 ``` -#### 2.启动roscore +#### 启动roscore ```c roscore ``` @@ -115,7 +116,7 @@ catkin_make ``` 设置文件可执行权限 ```c -chmod +x scripts/程序名.py +chmod +x /文件路径/程序名.py ``` 添加环境变量(所有新终端窗口要执行下列命令) ```c @@ -137,9 +138,13 @@ rosrun Topic_Newsletter Publisher_TN.py ```c rviz ``` -将RViz左侧 Global Options 面板中 Fixed Frame 设为 map (默认无需修改)。 +将RViz左侧 Global Options 面板中 Fixed Frame 设为 map (默认无需修改)。
在 Displays 面板中,点击 Add,添加 Marker 类型。 - +### 结果图 +终端运行数据结果:
+![话题通讯1](/Pictures/Topic_Newsletter_one.png#pic_center) +RViz图像:
+![话题通讯2](/Pictures/Topic_Newsletter_two.png#pic_center) ## 实验三 ### ROS中服务端和客户端 编译工作空间 @@ -148,7 +153,7 @@ catkin_make ``` 设置文件可执行权限 ```c -chmod +x scripts/程序名.py +chmod +x /文件路径/程序名.py ``` 添加环境变量 ```c @@ -168,11 +173,16 @@ rosrun Service Subscriber_Client_S.py ``` 启动发送端(终端D) ```c -rosrun Service Publister_S.py +rosrun Service Publisher_S.py ``` 启动RViz(终端F) ```c rviz ``` -将RViz左侧 Global Options 面板中 Fixed Frame 改为程序中的 world 。 +将RViz左侧 Global Options 面板中 Fixed Frame 改为程序中的 world 。
在 Displays 面板中,点击 Add,添加 Marker 类型。 +### 结果图 +终端运行数据结果:
+![服务和客户1](/Pictures/Service_one.png#pic_center) +RViz图像:
+![服务和客户2](/Pictures/Service_two.png#pic_center) \ No newline at end of file