使用ROS应用商店
APT
PACKAGE LIST
我们Linux使用的是20.0,使用的是NORTIC版本的ROS,如果有闪电图标,说明可以用APT来下载这个软件包
安装软件包 rqt_robot_steering
sudo apt install ros-noetic-rqt-robot-steering
启动ROS核心
roscore
启动程序
rosrun rqt_robot_steering rqt_robot_steering
第一个是包名,第二个是节点的名称
使用仿真小乌龟测试
sudo apt install ros-noetic-turtlesim
rosrun turtlesim turtlesim_node
修改速度发送的主题名称
turtle1/cmd_vel
最后再看一看SLAM的软件包
使用GITHUB
需要建立工作空间,将源码编译才能运行
创建工作空间
mkdir catkin_ws
mkdir src
sudo apt install git
开始下载源码包,编译,运行
git clone https://github.com/6-robot/wpr_simulation.git
执行noetic.sh脚本
./install_for_noetic.sh
对src目录中的所有源代码工程进行编译
catkin_make
加载到终端程序中
source ./devel/setup.bash
roslaunch wpr_simulation wpb_simple.launch
成功打开仿真页面
遇到问题
RLException: [wpb_simple.launch] is neither a launch file in package [wpr_simulation] nor is [wpr_simulation] a launch file name
The traceback for the exception was written to the log file
因为之前打开的终端被关闭了,需要重新添加环境变量
source ./devel/setup.bash
打开速度控制软件
rosrun rqt_robot_steering rqt_robot_steering
为了方便打开终端的时候ROS初始化,将设置工作空间环境参数的指令source添加到终端程序初始化脚本中。
这个是之前添加的>
我们新添加一行
这样再打开仿真就不用添加环境变量了