Win10子系统Ubuntu16.04下 ros的安装及小乌龟

时间:2024-04-02 13:56:06

第一步

 

1.设置 :更新与安全

Win10子系统Ubuntu16.04下 ros的安装及小乌龟

 

 

2.开发者选项 -打开开发者人员模式

Win10子系统Ubuntu16.04下 ros的安装及小乌龟

 

 

第二步:

1.打开控制面板

Win10子系统Ubuntu16.04下 ros的安装及小乌龟

 

2.选择程序

Win10子系统Ubuntu16.04下 ros的安装及小乌龟

 

Win10子系统Ubuntu16.04下 ros的安装及小乌龟

 

 

3.选择打上勾 确认

 

Win10子系统Ubuntu16.04下 ros的安装及小乌龟

 

4.然后安装 最后重启

 

5.最后在你的开始里面会有一个bash

 

然后微软商店下载ubuntu16.04

 

Win10子系统Ubuntu16.04下 ros的安装及小乌龟

 

安装就行了

第二步:

  1. 打开Ubuntu等待配置完成设置账户名和密码
  2. 输入命令行安装Ubuntu16.04上的kinetic版本的ros(建议可参考网址:https://blog.csdn.net/weixin_39036700/article/details/81629810)
  1. 添加软件源:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

       2.添加秘钥:

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

3.装ROS:

sudo apt-get update

sudo apt-get install ros-kinetic-desktop-full

4.初始化rosdep:

sudo rosdep init

rosdep update

       5.设置环境变量:

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc

source ~/.bashrc

       6.安装rosinstall:

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

       7.检测:

Roscore

第三步:安装x-ming(建议参考网址:Win10子系统Ubuntu16.04下 ros的安装及小乌龟https://wenku.baidu.com/view/8268c497aa00b52acfc7cafd.html

第四步(跑小乌龟):

    Run turtle_sim(小乌龟爬坑史)

The popular turtle_sim tutorial works fine WSL as well.

1. Make sure you have an X Server installed, configured and running as described above.

2. Start a new bash prompt and run roscore.

3. Start a second bash prompt and run rosrun turtlesim turtle_teleop_key.

4. Start a third bash prompt and run rosrun turtlesim turtlesim_node. You can control the turtle by using the arrow keys by

going back to the second prompt.

(调出可视化窗口后将光标点到第二个命令窗口按方向键移动)