ros安装

    技术2024-10-17  20

    Environment setup

    It’s convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

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

    If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.

    If you just want to change the environment of your current shell, instead of the above you can type:

    source /opt/ros/kinetic/setup.bash

    If you use zsh instead of bash you need to run the following commands to set up your shell:

    echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc source ~/.zshrc

    Dependencies for building packages

    Up to now you have installed what you need to run the core ROS packages. To create and manage your own ROS workspaces, there are various tools and requirements that are distributed separately. For example, rosinstall is a frequently used command-line tool that enables you to easily download many source trees for ROS packages with one command.

    To install this tool and other dependencies for building ROS packages, run:

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

    Initialize rosdep

    Before you can use many ROS tools, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS. If you have not yet installed rosdep, do so as follows.

    sudo apt install python-rosdep

    With the following, you can initialize rosdep.

    sudo rosdep init rosdep update

    Build farm status

    The packages that you installed were built by the ROS build farm. You can check the status of individual packages here.

    Tutorials

    Now, to test your installation, please proceed to the ROS Tutorials.

    Processed: 0.010, SQL: 9