sudo gedit /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
修改完毕后保存退出。
sudo apt-get update
sudo apt-get upgrade
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install ros-noetic-desktop-full
可能需要通过修复安装库
sudo apt update --fix-missing
source /opt/ros/noetic/setup.bash
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
env | grep ROS
小海龟测试需要依次打开三个新的命令行窗口:
窗口1:打开新窗口快捷键:Ctrl + Alt +T
roscore
窗口2:此时会跳出一个TurtleSim 小乌龟的控制窗口
rosrun turtlesim turtlesim_node
窗口3:
调用键盘控制。使用键盘方向键对小海龟进行控制。
切记,鼠标光标一定要聚焦在下方的3窗口中,方能通过键盘控制乌龟动起来哦
rosrun turtlesim turtle_teleop_key
运行roscore,从打印的信息找到版本信息:
sudo apt install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control
sudo apt-get install ros-noetic-turtlebot-*
sudo apt install ros-noetic-gmapping
export TURTLEBOT3_MODEL=burger # 每次新打开这个终端,都需要运行一次
roslaunch turtlebot3_gazebo turtlebot3_world.launch
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch --screen
只有选中该命令窗口,才能操作。
按照提示,使用键盘上的a、w,s,d等键就可以看见机器人的Gazebo窗口中运动。
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_slam turtlebot3_gmapping.launch
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_navigation turtlebot3_navigation.launch
git clone https://github.com/stevengj/nlopt.git
cd nlopt
mkdir build
cd build
cmake ..
make
sudo make install
sudo apt-get install libarmadillo-dev
然后进行源码的编译:
mkdir -p catkin_fast-planner/src
cd catkin_fast-planner/src
git clone https://github.com/Junking1/Fast-Planner-for-ubuntu20.04.git
cd ../
catkin_make
在目录catkin_fast-planner下打开终端,输入:
source devel/setup.bash && roslaunch plan_manage rviz.launch
再在此目录下打开一个终端,输入:
source devel/setup.bash && roslaunch plan_manage kino_replan.launch
然后你就可以在rviz下使用2D Nav Goal进行测试了
(c++库问题)
Ubuntu快速搭建C++开发环境(VS Code编辑器)_小古银的博客-CSDN博客