Installation
Prerequisites
The JCS dev_host library requires:
- A real-time operating system.
- SOEM Ethercat master
- yaml-cpp
Realtime Linux operating system
The real-time requirements for the robotic system are left up to the user. JCS dev_host runs on Linux Preempt/RT kernel quite well, however hard real-time patches (RTAI etc) are supported.
yaml-cpp
Ensure libyaml-cpp-dev
and libyaml-cpp
are installed.
Minimum version: 0.7.0
SOEM EtherCAT master
Obtain the latest version of Simple Open EtherCAT Master Library from:
https://github.com/OpenEtherCATsociety/SOEM
Build the library per the SOEM instructions:
mkdir build
cd build
cmake ..
make
Install the SOEM library files:
make install
This will gather all the required SOEM files and install them into $(SOEM_DIR)/install
Integration into your project
JCS dev_host is provided as the static Linux library libjcs_host.a
and a number of C++ header files.
You should have the following files:
libjcs_host.a
jcs_host.h
jcs_host_types.h
jcs_user_external.h
Ensure your Makefile links to the jcs_host library, YAML and SOEM and includes the headers. For example:
# Include JCS library
LIB_EXT += -L$(JCS_DIR) -ljcs_host
INC_EXT += -I$(JCS_DIR)
# Include SOEM library
LIB_EXT += -L$(SOEM_DIR)/install/lib -lsoem
INC_EXT += -I$(SOEM_DIR)/install/include/soem/
# Include YAML library
LIB_EXT += -lyaml-cpp
INC_EXT += -I/usr/include/yaml-cpp
JCS dev_host requires a minimum of c++11.
jcs_user_external
The C++ header jcs_user_external.h
has prototypes for a number of functions that the user needs to implement.
All functions within jcs_user_external.h
are functions that may be required to make calls to the underlying real-time system.
Please inspect the header file and implement any functions defined within.