ROS-docs

View the Project on GitHub XinZhangk/ROS-docs

Setup the test environment

Our robot and the ROS system can be run on: ubuntu 16 and ROS Kinetic, or ubuntu 18 and ROS Melodic. Here are the instructions that help you set up the development environment.

If you already have ROS installed, please refer to the second part of instructions from the index page.

Ubuntu

Assume that you are a decent developer and has kept up with the latest version of whatever linux distribution you use.
You should be able to install the OS yourself. We mostly like would not have a low version ubuntu installed. We can however use VirtualBox, a free software to install virtual machines. To install ubuntu 16, we need the iso file. Note that it is recommended to choose the 64 bit version (AMD64) for compatibility of production environment, and also it is recommanded to install your own ubuntu 16/18 system, as the virtual machine is extremly slow.

Run the following command in your favourite terminal shell (but we only tested on bash)

  sudo apt install git vim openssh-client openssh-server build-essential

Although the development suite and simulations can be run on a virtual machine, performance is normally less than ideal. We strongly recommend to install ubuntu natively on your own machine.

ROS

ROS can be found at here. We recommend the ubuntu version of ros-kinetic-desktop-full and follow all the steps here.

Alternatively, if you are using Ubunut 18.04 OS, you can install ros-melodic-desktop-full and follow all the steps here.

Setting up RoboRTS

The following instructions are for setting up official software development repo from RoboMaster, DJI. Please ignore those if you want to try our project.

Then install necessary dependency packages.

    sudo apt-get install ros-kinetic-opencv3 ros-kinetic-cv-bridge ros-kinetic-image-transport \
    ros-kinetic-stage-ros ros-kinetic-map-server ros-kinetic-laser-geometry ros-kinetic-interactive-markers \
    ros-kinetic-tf ros-kinetic-pcl-* ros-kinetic-libg2o protobuf-compiler libprotobuf-dev libsuitesparse-dev \
    libgoogle-glog-dev ros-kinetic-rviz libopenni2-dev

RoboRTS

# Make dir for workspace
mkdir -p $HOME/roborts_ws/src

# Clone this repository
cd $HOME/roborts_ws/src
git clone https://github.com/RoboMaster/RoboRTS.git

As long as the package is under some child directory of src, catkin can detect it automatically. Next step is then to build the system.

# Build RoboRTS
cd $HOME/roborts_ws
catkin_make

It is important that the codebase resides at src, under the roborts_ws directory.

The name of your workspace should not matter: roborts_ws is simply an example. After waiting nervously for a few minutes, we should see terminal telling us that all targets are built successfully.

Then run the following to enable necessary environment setting for ROS commands.

source $HOME/roborts_ws/devel/setup.bash

After this, we should be able to run ROS commands for various purposes. To run a hello-world-esque test, we can run the following command.

roslaunch roborts_bringup roborts_stage.launch

If everything runs smoothly, we should bring up a rviz session. Notice that this command actually runs a 2D simulation, but since this is just a skeleton project, there is no autonomy.