Skip to content

nyu_finger_setup

Huaijiang Zhu edited this page Jan 30, 2023 · 7 revisions

Follow these instructions to setup the NYU finger on a new PC.

Install the dependencies

Setup the official Ubuntu image as instructed here and we strongly recommend installing the realtime kernel patched with preempt-rt (unless you absolutely need CUDA.) Some additional packages also need to be installed

python3 -m install breathe
sudo apt install libcereal-dev libedit-dev doxygen

Install the software stack for NYU Finger

Git clone the treep configuration repo. It is the project manager we use in the Machines in Motion Lab; it allows us to clone all relevant repos for the NYU Finger project in one shot.

mkdir ~/devel
cd ~/devel
git clone https://github.com/machines-in-motion/treep_machines_in_motion/
treep --clone-https DG_NYU_FINGER

Now the packages you need are cloned in ~/devel/workspace/src. Before compiling the packages, at the time of writing, you need to roll back to an older commit for odri_control_interface

cd ~/devel/workspace/src/odri_control_interface
git checkout -b old_commit fd83c27

Then, make the following changes in ~/devel/workspace/src/odri_control_interface/CMakeLists.txt

  1. Remove the following lines
  findpython(REQUIRED)
  search_for_boost_python(REQUIRED)
  1. Update the eigenpy version requirement
add_project_dependency(eigenpy 2.7.10 REQUIRED PKG_CONFIG_REQUIRES
                         "eigenpy >= 2.7.10")
  1. Modify the yaml library target from target_link_libraries(${PROJECT_NAME} ${YAML_CPP_LIBRARIES}) to
target_link_libraries(${PROJECT_NAME} yaml-cpp)

See this PR for more details.

Additionally, you need to toggle off the BUILD_ROS_DYNAMIC_GRAPH option for dynamic_graph_manager in ~/devel/workspace/src/dynamic_graph_manager/CMakeLists.txt. Hence, change the line OPTION(BUILD_ROS_DYNAMIC_GRAPH "Build with ROS and DynamicGraph" ON) to OPTION(BUILD_ROS_DYNAMIC_GRAPH "Build with ROS and DynamicGraph" OFF).

At the time of writing, building the packages requires a lower version of mistune, use the following command to downgrade.

python3 -m pip install mistune==0.8.4

Now, go to the workspace and compile the packages with colcon.

cd ~/devel/workspace
source /opt/ros/foxy/setup.bash
source /opt/openrobots/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF -DBUILD_TESTING=OFF

This may fail the first time you do it as the install/setup.bash is not yet generated and sourced. Simply source it after the first compilation attempt source ~/devel/workspace/install/setup.bash and try again.

After the compilation completes, run this command to give Jupyter notebook power to communicate with the robot (change Python version accordingly)

sudo setcap cap_net_admin,cap_net_raw+ep /usr/bin/python3.8

Run a demo to see if everything is fine.

Clone this wiki locally