Building on Mac OS is totally experimental and not that useful. We strongly recommend to use Ubuntu Linux LTS with ROS.
When building for Mac OS, one can use the dVRK stack with simulated arms (in kinematic mode) and potentially with the real arms with the ethernet interface (Local Link). The ethernet interface requires firmware version 7 or higher AND controllers with a physical network interface. Even with the network interface, the Mac OS build is lacking the current features:
- ROS. The code will run but you will need to use something like sawsSocketStreamer or sawOpenIGTLink as middleware
- Potentiometer calibration and gravity compensation identification (calibration programs are using ROS)
catkin build
- ...
- Xcode
- CMake, see www.cmake.org
- A Fortran compiler. This one works: http://hpc.sourceforge.net/#fortran. The following might be even easier to install and use: /~https://github.com/fxcoudert/gfortran-for-macOS/releases as it comes with a Mac installer (
dmg
file). - Qt. You will need to create an account and download the free version
The current process is not automated. It might be possible to install the programs wstool
and catkin
since both are Python based but I didn't try. The build is performed in steps and each step requires to configure (CMake), build and install. I prefer "Unix Makefiles" but one could probably use Xcode projects.
mkdir ~/dVRK
cd ~/dVRK
clone /~https://github.com/jhu-cisst/cisst-saw.git --recursive
As of December 2020, you need to use the devel
branches to compile on Mac OS:
cd ~/dVRK/cisst-saw
git submodule foreach git checkout devel
git submodule foreach git pull origin devel
git submodule foreach git submodule init
git submodule foreach git submodule update
When using CMake, pick the generator "Unix Makefiles" and select "Specify native compilers". In the next window, specify the "Fortran" compiler only. If you've installed the compiler mentioned above, it should be /usr/local/bin/gfortran
. For CMake, use the source directory /Users/you/dVRK/cisst-saw/cisstNetlib
. Please note that you
in /Users/you
should be replaced by your login name.
In CMake, change:
CMAKE_BUILD_TYPE
toRelease
CMAKE_INSTALL_PREFIX
to/Users/you/dVRK/install
Then in CMake, configure and generate. In the build tree, build using make
and then install with make install
.
In CMake, use the generator "Unix Makefiles" and the source tree should be /Users/you/dVRK/cisst-saw
.
In CMake, change the following settings (for reference, the GitHub workflow uses a CMake config file):
CMAKE_BUILD_TYPE
toRelease
CMAKE_INSTALL_PREFIX
to/Users/you/dVRK/install
CISSTNETLIB_DIR
to/Users/you/dVRK/install
CISSTNETLIB_USE_LOCAL_INSTALL
checkedCisstnetlib_DIR
to/Users/you/dVRK/install/cmake
CISST_HAS_QT5
checked - you will also need to set all the Qt paths, e.g.Qt5Core_DIR
set to/Users/you/Qt/5.15.2/clang_64/lib/cmake/Qt5Core
CISST_USE_EXTERNAL
checkedCISST_HAS_JSON
checkedCISST_USE_SI_UNITS
checkedCISST_BUILD_SHARED_LIB
checkedCISST_cisstRobot
checkedSAW_sawControllers
checkedSAW_sawIntuitiveResearchKit
checkedSAW_sawRobotIO1394
checked
You should be able to configure and generate in CMake. In your build tree for cisst-saw, make -j
. No need to install.
In your build tree for cisst-saw, you will need to set some environment variables:
source cisst/cisstvars.sh
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/you/dVRK/build/cisst-saw/cisst/cisstReflexxesTypeII/lib
The last command is to find the shared libraries for Reflexxes. The path will depend on where you built cisst-saw.
Then go in your source tree:
cd ~/dVRK/cisst-saw/sawIntuitiveResearchKit/share/console
sawIntuitiveResearchKitQtConsoleJSON -j console-full-system-simulated.json