Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Accelerating Robot Dynamics Gradients on a CPU, GPU, and FPGA

This repository contains the code associated with the paper "Accelerating Robot Dynamics Gradients on a CPU, GPU, and FPGA", accepted to RA-L 2021. It is available under the open source MIT license and can be cited as shown below:

  title={Accelerating Robot Dynamics Gradients on a CPU, GPU, and FPGA},
  author={Plancher, Brian and Neuman, Sabrina M. and Bourgeat, Thomas and Kuindersma, Scott and Devadas, Srini and Reddi, Vijay Janapa},
  journal={Robotics and Automation Letters (RA-L)},

Timing tests and code for the CPU and GPU.

The baseline code (and compilation instructions) are:

time_CPU_pinnochip.cpp # /utils
clang++-10 -std=c++11 -o pinnochio_timing.exe time_CPU_pinnochio.cpp -O3 -DPINOCCHIO_URDFDOM_TYPEDEF_SHARED_PTR -DPINOCCHIO_WITH_URDFDOM -lboost_system -L/opt/openrobots/lib -lpinocchio -lurdfdom_model -lpthread       # /utils, /helpers_WAFR
nvcc -std=c++11 -o WAFR_timing.exe -gencode arch=compute_75,code=sm_75 -O3

Our accelerated implementations (and compilation instructions) are:

time_CPU.cpp           # /utils, /helpers_CPU
g++ -std=c++11 -o CPU_timing.exe time_CPU.cpp -lpthread -O3 -march=native -mavx            # /utils, /helpers_GPU
nvcc -std=c++11 -o GPU_timing.exe -gencode arch=compute_75,code=sm_75 -O3

Installing the neccessary software dependencies (for the CPU and GPU timing files)

Dependencies for the various packages

sudo apt-get update
sudo apt-get -y install git build-essential libglib2.0-dev dkms xorg xorg-dev cpufrequtils net-tools linux-headers-$(uname -r) meld apt-transport-https cmake libboost-all-dev


sudo bash -c "$(wget -O -"


Download and install

cd ~/Downloads
wget -q
tar -xf 3.3.7.tar.bz2
cd eigen*
mkdir build && cd build
cmake ..
sudo make install

Add symlinks

sudo ln -s /usr/local/include/eigen3/Eigen /usr/local/include/Eigen
sudo ln -s /usr/local/include/eigen3/unsupported /usr/local/include/unsupported


Download and install

sudo apt install -qqy lsb-release gnupg2 curl
echo "deb [arch=amd64] $(lsb_release -cs) robotpkg" | sudo tee /etc/apt/sources.list.d/robotpkg.list
curl | sudo apt-key add -
sudo apt-get update
sudo apt install -qqy robotpkg-py27-pinocchio

Add to bashrc

echo #Pinnochio >> ~/.bashrc
echo export PATH=/opt/openrobots/bin:$PATH >> ~/.bashrc
echo export PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATH >> ~/.bashrc
echo export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH >> ~/.bashrc
echo export PYTHONPATH=/opt/openrobots/lib/python2.7/site-packages:$PYTHONPATH >> ~/.bashrc
echo export CMAKE_PREFIX_PATH=/opt/openrobots:$CMAKE_PREFIX_PATH >> ~/.bashrc
echo export C_INCLUDE_PATH=/opt/openrobots/include:$C_INCLUDE_PATH >> ~/.bashrc
echo export CPLUS_INCLUDE_PATH=/opt/openrobots/include:$CPLUS_INCLUDE_PATH >> ~/.bashrc


Download and set things up

sudo echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf
sudo echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nouveau.conf
cd ~/Downloads
sudo update-initramfs -u

If you get errors on missing firmware do this:

Go into headless mode for rest of CUDA install -- GPU MUST BE INSTALLED FOR THIS

sudo service lightdm stop # Or Cntrl+Alt+F3 Or boot via recovery mode and enter the root command line
cd ~/Downloads
sudo sh

When running it choose to install the drivers and cuda toolkit (no need for the samples or doc)

sudo serivce lightdm start # Or Cntrl+Alt+F2 Or Cntrl+d and resume normal boot

Add to bashrc

Note that cuda below might be cuda-version. In that case update the below or symlink.

echo #CUDA >> ~/.bashrc
echo export PATH="usr/local/cuda/bin:$PATH" >> ~/.bashrc
echo export LD_LIBRARY_PATH=":usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc


No description or website provided.





No releases published


No packages published