This is a neuron library ROS 2 example for ADLINK's products. You can easily rewrite your program based on these examples.
- ROS version:
- ROS 2 Foxy
- Ubuntu version:
- 18.04
- 20.04
- Hardware support list:
- ROSCube-I
- ROSCube-X
If you use Neuron SDK, then Neuron Library should be built-in. Otherwise, you can download Neuron Library here
You can use the example directly.
Please contact ADLINK if you have any question about Neuorn Library.
- Install ROS 2
- Create workspace and git clone this package from github
# You can name your workspace.
mkdir -p neuronlib_example_ws/src
cd neuronlib_example_ws/src
git clone https://github.com/Adlink-ROS/neuron_library_example.git
cd ..
- Build this ROS 2 package.
# please source ROS 2 develop env before colcon build
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
- Source package
# Source the package everytime you open a new terminal
source install/local_setup.bash
If you don't have Neuron Library, then git clone MRAA Library and build by yourself. The environmental variables need to be set before building (colcon build) this example.
- Install ROS 2
- Install and Build the mraa package
mkdir -p ~/mraa_ws/src
cd ~/mraa_ws/src
git clone https://github.com/Adlink-ROS/mraa.git -b roscube_series
cd mraa
mkdir build
cd build
cmake ..
make
- Set environmental variables of MRAA Library.
# Your library path
export NLIB_MRAA_LIBRARY_PATH=~/mraa_ws/src/mraa/build/src
# Your header path
export NLIB_MRAA_INCLUDE_PATH=~/mraa_ws/src/mraa/api
- Create workspace and git clone this package from github
# You can name your workspace.
mkdir -p ~/neuronlib_example_ws/src
cd ~/neuronlib_example_ws/src
git clone https://github.com/Adlink-ROS/neuron_library_example.git
cd ..
- Build this ROS 2 package.
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
- Source package
# Source the package everytime you open a new terminal
source install/local_setup.bash
To view the usage of examples more detailed, pleace click the links below.