测试完成实验二、完善描述文档

This commit is contained in:
张梦南 2025-07-01 22:54:54 +08:00
parent 85d0b7769f
commit b4047e937f

View File

@ -68,7 +68,7 @@ dpkg -l | grep ros-noetic-roslaunch
# 若roslaunch以安装则无需执行下条命令 # 若roslaunch以安装则无需执行下条命令
sudo apt install ros-noetic-roslaunch sudo apt install ros-noetic-roslaunch
# 将路径换为文件/文件夹路径,赋予文件/文件夹可执行权限 # 将路径换为文件/文件夹路径,赋予文件/文件夹可执行权限
chmod -x /路径 chmod +x /路径
# 将文件/文件夹可编辑权限赋予某用户 # 将文件/文件夹可编辑权限赋予某用户
sudo chown -R 用户名:用户名 /路径 sudo chown -R 用户名:用户名 /路径
``` ```
@ -91,27 +91,27 @@ rosrun turtlesim turtle_teleop_key
```c ```c
catkin_make catkin_make
``` ```
启动roscore终端A
```c
roscore
```
添加环境变量(所有新终端窗口要执行下列命令) 添加环境变量(所有新终端窗口要执行下列命令)
```c ```c
source /home/zmn/Gitea/ROS_Learn/devel/setup.bash source /home/zmn/Gitea/ROS_Learn/devel/setup.bash
``` ```
启动发送端终端B 启动roscore终端A
```c ```c
rosrun position_demo publisher_node.py roscore
``` ```
启动订阅端(终端C 启动订阅端(终端B
```c ```c
rosrun position_demo subscriber_node.py rosrun Topic_Newsletter Subscriber_TN.py
```
启动发送端终端C
```c
rosrun Topic_Newsletter Publisher_TN.py
``` ```
启动RViz终端D 启动RViz终端D
```c ```c
rviz rviz
``` ```
注:将RViz左侧 Global Options 面板中 Fixed Frame 改为程序中的 world 将RViz左侧 Global Options 面板中 Fixed Frame 设为 map (默认无需修改)
在 Displays 面板中,点击 Add添加 Marker 类型。 在 Displays 面板中,点击 Add添加 Marker 类型。
## 实验三 ## 实验三