Ubuntu18.04 & ROS melodic
打开终端输入如下指令
sudo gedit ~/.bashrc //若没有安装gedit,则使用install指令安装
下拉文件至末查看是否有如下路径
source ~/gazebo_test_ws/devel/setup.bash
- 若不存在,输入如下指令:
echo "source ~/gazebo_test_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc //使配置的环境变量生效
sudo apt install ros-melodic-navigation*
sudo apt-get install ros-melodic-teb-local-planner
在gazebo_test_ws/src/start_game目录下,运行main.py
cd ~/gazebo_test_ws/src/start_game
python2 main.py
右键main.py - Properties - Permissions
勾上Execute: Allow executling file as program