C++ library of PLCopen motion control function blocks
The documentation can be compiled to doc subfolder through the commands:
sudo apt install graphviz
doxygen ./DoxyfileOpen doc/html/index.html to check the documentation.
Install system depends:
sudo apt-get -qq install cmake git build-essentialInstall Ruckig:
git clone -b v0.9.2 https://github.com/pantor/ruckig.git
cd ruckig
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make installcd <RTmotion_root_directory>
mkdir build && cd build
# If build on Ubuntu Linux, run the next command
cmake ..
# If build on PREEMPT Linux, run the next command
cmake ..
# If build on Xenomai, run the next command
cmake .. -DXENOMAI_DIR=<path_to_xenomai_directory>
make && sudo make install
# Try **sudo ldconfig** after installation if meet any problem related to library file missing.Note: Install googletest then add
-DTEST=ONor-DPLOT=ONto CMake commands if need to do Unit Test or plot the result. Check Unit Test below for details.
<build folder>/src/multi-axisRunning the evaluation program using the following commands:
<build folder>/src/multi-axis-monitorNote: This evaluation program enables a MC_MoveRelative function block running in 1ms real-time cycle. The function block will be re-triggered everytime it finished its task. It can be stopped by
Ctrl+C.
Googletest is used as the test framework. Therefore, if test running is desired, follow the commands below to install gtest at first.
sudo apt install googletestor
git clone -b v1.14.0 https://github.com/google/googletest.git
cd googletest
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="-std=c++11"
make
make installNote: In order to build the tests, add the argument
-DTEST=ONto CMake commands.
To enable the plotting in the test, add CMake argument -DPLOT=ON and install the dependencies below:
sudo apt-get install python3-matplotlib python3-numpy python3-devRun unit tests by following the commands below:
-
On-line S-Curve Algorithm Test:
<build folder>/test/online_scurve_test
-
Trjactory Planner Test:
<build folder>/test/planner_test
-
Function Block Test:
<build folder>/test/function_block_test
By default the header files are installed to /usr/local/include/RTmotion/, the library file libRTmotion.so are installed to /use/local/lib.