Implementation of Human guided RMPflow in PyTorch. This package has been tested on python3.5.
- urdf_parser_py:
pip3 install urdf-parser-py - pytorch (>=1.5.0)
- numpy (>=1.18.5)
- matplotlib (>=0.1.9)
- fastdtw (>=0.3.4)
- tensorboardX (>=2.0)
NOTE: Unsource ROS before doing this
Full ROS installation comes pre-packaged with kdl and its python binding PyKDL. However KDL (1.3.0) for ros-kinetic does not have ChainToJacDotSolver function which is otherwise there in the newer version. To use the 1.4.0 alongside ROS kinetic, we will have to install KDL and PyKDL from source,
- Install SIP (Check the version already installed by
sip -V. If 4.19 or later is installed, you might wanna install 4.17-4.18 instead)- Download the 4.17 tar file from https://sourceforge.net/projects/pyqt/files/sip/sip-4.17/.
- Extract
tar -zxf sip-4.7.tar.gz cd sip-4.17.tar.gzand build usingpython configure.py- Install
make,sudo make install - run
sudo ldconfig
- Clone KDL and PyKDL (make sure to use this fork!):
git clone https://github.com/MichaelLutter/orocos_kinematics_dynamics - Install KDL C++ library:
- Configure:
cd <kdl_dir>/orocos_kdl.mkdir build && cd build. ccmake .., press[c]to configure and[g]to generate- Install:
makeandsudo make install
- Configure:
- Install PyKDL for python3
- Configure:
cd <kdl_dir>/python_orocos_kdl.mkdir build && cd build ccmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_VERSION=3 -Dorocos_kdl_DIR=/usr/local/share/orocos_kdl/cmake ..- IMPORTANT: You might wanna double check
orocos_kdl_pathis set to/usr/local/share/orocos_kdl/cmake. You can just doccmake ... - Install:
make -j4andsudo make install
- Configure:
- The above steps will install generate
/usr/local/lib/python3/dist-packages/PyKDL.so. Now we have to force our python scripts to link to this version instead of that in/opt/ros/kinetic/lib/python2.1/dist-packages/PyKDL.so:- Run
sudo ldconfigto make the system find the new version first - To run alongside ROS, prepend the installation path to PYTHONPATH by adding this line after sourcing ROS to your bashrc
export PYTHONPATH=/usr/local/lib/python3/dist-packages:$PYTHONPATH - You might also want to add to
LD_LIBRARY_PATH. Add this to bashrc:export LD_LIBRARY_PATH=/usr/local/lib/python3/dist-packages:$LD_LIBRARY_PATH - Source bashrc
- Run
sudo ldconfigagain
- Run
Did you unsource ROS? Check by running roscore.
Check this issue: https://github.com/orocos/orocos_kinematics_dynamics/issues/115
NOTE: Unsource ROS before doing this
kdl_parser that comes with ROS kinetic does not support Python3 either. However the newer version of kdl_parser does use python3. We need to install the newer version from source.
- Clone repo
git clone https://github.com/ros/kdl_parser.git. - Checkout the noetic release:
cd kdl_parser,git checkout tags/1.14.0. - Install kdl_parser:
cd kdl_parser && mkdir build && cd build,ccmake ..(See the debug info below if cmake is old). - Install kdl_parser_py:
cd kdl_parser_py,sudo setup.py install - Add to PYTHONPATH:
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/kdl_parser_py-1.14.0-py2.7.egg:$PYTHONPATH
kdl_parser installation might need upgrading cmake. Follow these steps:
Warning -- Do not do step 2 if you have Robot Operating System (ROS) installed
- Check your current version with cmake --version
- Uninstall it with sudo apt remove cmake
- Visit https://cmake.org/download/ and download the latest binaries
- In my case cmake-3.6.2-Linux-x86_64.sh is sufficient copy the binary to /opt/
chmod +x /opt/cmake-3.*your_version*.sh(chmod makes the script executable)sudo bash /opt/cmake-3.*your_version.sh*(you'll need to press y twice)- The script installs to /opt/cmake-3.your_version so in order to get the cmake command, make a symbolic link:
sudo ln -s /opt/cmake-3.*your_version*/bin/* /usr/local/bin source ~/.bashrc- Test your results with
cmake --version.