大赛规则

> 更多

大赛问答

> 更多

比赛照片

> 更多
  • 2022年大赛照片
  • 2022年大赛照片
  • 2022年大赛照片
  • 2022年大赛照片
  • 2022年大赛照片
  • 2022年大赛照片
  • 2022年大赛照片
  • 2020大赛活动照片
  • 2020大赛活动照片
  • 2020大赛活动照片
Vrep series 1-Simulation environment building guide V1.0.19-Notifications-Robot competition-Robot competition
大赛通知 Notifications

Notifications

Vrep series 1-Simulation environment building guide V1.0.19

2020-06-17

1.Introduction of simulation software vrep

The full name of vrep is virtual robot experiment platform. V-rep is a robot simulator with integrated development environment, based on distributed control architecture: each object / model can be individually controlled through embedded scripts, plug-ins, ROS or bluezero nodes, remote API clients or customized solutions. This makes v-rep very versatile and suitable for multi robot applications. The controller can be written in C / C + +, python, Java, Lua, MATLAB, or octave. V-rep is used for rapid algorithm development, factory automation simulation, rapid prototype and verification, robot related education, remote monitoring, safety review, etc.

01.jpg

Including robot models provided by many robot companies:
• ABB. There is however no link between ABB and V-REP
• KUKA Laboratories GmbH
• SICK AG
• Hibot
• K-Team
• Cubictek
• Neuronics
• Aldebaran
• IniLabs
• Robotiq
• Kinova Robotics
• Universal Robots
• Rethink Robotics
• Trossen Robotics
• Adept Technology
• Force Dimension
• On Robot ApS
• EVOL
• Blue Workforce

02.jpg


You can also import models designed by other design software:

CAD: OBJ, STL, DXF, 3DS (Windows only), and Collada. 

03.jpg

 

2. Ubuntu system installation

The following method is applicable to adding Ubuntu on the basis of win7 system, and using dual system. Please refer to

Installing Ubuntu 16.04 on Windows 7 computers

https://mp.weixin.qq.com/s/1BAFjfzm5qNH9H1Ou4qr7g

Note: you need to download ubuntu-16.04.6-desktop-amd64.iso first

You can download it on the Internet or download ubuntu-16.04.6-desktop-amd64.iso from the following:

Link: https://pan.baidu.com/s/1vqukxie95PrZcfkmctZU0w

Extraction code: p5pw

Participants can also prepare their own computers to install Ubuntu system or use virtual machine mode

For virtual machine installation, please refer to https://www.onlinedown.net/soft/82464.htm

3.ROS installation

The simulation environment is to install ROS kinetic version under Ubuntu 16.04 system. Please refer to the following steps to install:

    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-get update

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

 

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

    source ~/.bashrc

 

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

 

    sudo rosdep init

    rosdep update

 

After the above steps are completed, you can enter the command at the terminal to check whether the rosmaster can run

roscore

 

Press`ctrl+c` to close rosmaster

You can refer to https://www.ncnynl.com/archives/201801/2273.html

4. CoppeliaSim/V-REP installation

Download address:

https://www.coppeliarobotics.com/previousVersions

 

V-rep Pro edu V3_ 6_ 2 Ubuntu16_ For version 04, you need to download the version indicated by the following arrow version.


 

04.png

The name of the downloaded file is v-rep_ PRO_ EDU_ V3_ 6_ 2_ Ubuntu16_ Four tar.xz

Extract after saving the root directory of the user:

xz –d V-REP_ PRO_ EDU_ V3_ 6_ 2_ Ubuntu16_ Four tar.xz

Then expand the tar file:

tar –xvf V-REP_ PRO_ EDU_ V3_ 6_ 2_ Ubuntu16_ 04.tar

Change directory name to vrep:

mv V-REP_ PRO_ EDU_ V3_ 6_ 2_ Ubuntu16_ 04 vrep

Modify the environment variables and save them to the Linux startup file:

echo 'export VREP_ ROOT="~/vrep"' >> ~/.bashrc

source ~/.bashrc

So far, the configuration of ROS and the installation of vrep under Ubuntu are completed

5. Verify and start vrep software

First, open a new terminal and execute the command

 

Roscore note: the first command you need to run before running all ROS programs

Execute normally as shown in the figure


05.png

You can hide this terminal

Then open a new terminal and run vrep

~/vrep/ vrep.sh

 

Or:

 

cd ~/vrep

 

/ vrep.sh

 

be careful: vrep.sh Multi level relative path mode call is not supported, for example:

 

cd ~

 

./vrep/ vrep.sh

        If the following conditions occur, it means that ROS does not start normally. You need to check the configuration and operation of ROS.

06.png

 

The normal situation should be as follows, which shows that vrep software can work normally and exit vrep software.


07.png

6.Engineering configuration compilation

6.1 downloading engineering documents

        This version of engineering document is roban-v1.1 tar.gz , download link is

Link: https://pan.baidu.com/s/1UD_ JW-jbAQ-VJ3BAPHYR0A

Extraction code: jp73

        Participants need to check the official website to download the latest version of the file

Extract to the user root directory: tar xzf roban.tar.gz

        After decompression, the roban project folder is generated in the root directory, as shown in the figure below. The project path on the contestant's computer should be

/home / username / roban

        Note: the user name is the participant's own Ubuntu system user name

08.png

 

6.2 Install osqp solver

Reference resources https://osqp.org/docs/get_ started/cc++

It is recommended to compile with source code as follows


    git clone --recursive https://github.com/oxfordcontrol/osqp


         cd osqp

         mkdir build

         cd build

         cmake -G "Unix Makefiles" ..

         cmake --build .

         sudo cmake --build . --target install

Reference resources https://osqp.org/docs/get_started/sources.html#build-from-sources

 

6.3 Install RBDyn

Reference resources https://github.com/jrl-umi3218/RBDyn

# Make sure you have required tools
sudo apt install apt-transport-https lsb-release
# Add our key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 892EA6EE273707C6495A6FB6220D644C64666806
# Add our repository (stable versions)
sudo sh -c 'echo "deb https://dl.bintray.com/gergondet/multi-contact-release $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/multi-contact.list'
# Use this to setup the HEAD version
# sudo sh -c 'echo "deb https://dl.bintray.com/gergondet/multi-contact-release $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/multi-contact.list'
# Update packages list
sudo apt update                                                    
# Install eigen-qld packages
sudo apt install librbdyn-dev python-rbdyn python3-rbdyn


 

 

6.4 compilation Engineering

        Install some additional packages before compiling the project to avoid compilation errors and execute commands

sudo apt-get install libeigen3-dev

sudo ln –s /usr/include/eigen3/Eigen /usr/include/Eigen

        If the clang compiler is not installed on this machine, you need to install it before compiling the project and execute the command

apt-get install clang

        Enter the roban folder to compile the project:

cd ~/roban

catkin_ make

        After the compilation is successful, you need to execute the following command

source devel/ setup.bash

        After the project is compiled, the participants can start the simulation environment. In order to use the ROS environment to reduce the workspace settings, you can execute the following command to configure the workspace environment

echo 'source ~/roban/devel/ setup.bash '>> ~/.bashrc

source ~/.bashrc


7. Demo scenario demonstration of simulation software

        In this section, the demonstration of the square challenge game is realized. The simulation software is started through 7.1, loaded into the virtual game scene in 7.2, and related ROS commands are run in the terminal. The demo program that provides reference is Python program, which can realize the robot walking after running.

7.1 start simulation software

        Refer to step 5 to start the simulation software. In the first terminal window, run roscore:

roscore

        Note: only one roscore process can run on the same computer (server). If more than one person shares a computer, only one roscore process of one user is allowed to run.

In the second terminal window, run vrep:

~/vrep/ vrep.sh


7.2 loading competition scenes and robots

        Click file in the menu bar of vrep software and select the loading scenario, as shown below:


09.png

        Under / home / user name / roban / SRC / bodyhub / vrep, the scene name is rb-c-e-x.x, where x is the version number, and the latest version of the official website should be selected. Please download the latest version on the official website and unzip it to this folder, as shown below, select and open it:



10.png

7.3 select the simulation engine and select other engines after loading the scene, as shown in the following figure. The engine is Newton

11.png

 

Open the new terminal, enter the following command to run the node, and set the SIM variable parameter to true

cd ~/roban

source devel/setup.bash

roslaunch bodyhub bodyhub.launch sim:=true 

Open a new terminal, and use the package name imination to run a package's imination directly_ Node node

cd ~/roban

source devel/setup.bash

rosrun imitation imitation_node

 

11.png

 

7.4 running demo program

        Note that this demo program is a python program, and other program languages need to be compiled into executable files by themselves

Open the new terminal, enter the project directory roban, run the python program, and the robot will start to walk.

python ./src/actexecpackage/scripts/walking2.py  

13.png

7.5 write your own program. 

        Through step 7.4, you can see that the robot is walking slowly. The environment and configuration are all OK here. You can refer to step 7.4 for program rewriting or write your own robot program. If you have any other problems, please contact event support.