This project depends on sai2 libraries. The install instructions can be found here.
Create a build
directory, then make by running:
mkdir build
cd build
cmake .. && make -j4
In Sai2Graphics.cpp, under
void Sai2Graphics::renderGraphicsWorld()
You will need to comment out the lines
setCameraPose(camera_name, camera_pos, camera_up_axis, camera_lookat_point);
and
render(camera_name);
Additionally, in Sai2Graphics.h, you will also need to move
void render(const std::string& camera_name);
from private to public.
- Clone the chai3d wrapper:
git clone
https://github.com/manips-sai-org/chaiHapticdeviceRedisDriver.git
- Install all dependencies:
sudo apt-get install cmake redis redis-server libhiredis-dev libjsoncpp-dev
- From the source directory, create a build directory and make:
cd chaiHapticdeviceRedisDriver
mkdir build && cd build
cmake .. && make -j4
- Start the Redis server:
redis-server
-
Plug in the haptic device to your device (e.g. laptop) and power it on.
-
Calibrate the device. For example, for Falcon Novint, gently pull the controller out to its limit, press the HOME button, then release it.
-
From
chaiHapticdeviceRedisDriver/build
, run:
sudo ./chai_devices_redis_driver
- Start Redis server (if not already running):
redis-server
- From the
bin
folder, navigate to the directory of the application to run:
cd bin/ocean1
- Run the simulation:
./simviz_ocean1
- From another terminal, run:
./controller_ocean1
-
The haptic device should return to its HOMED state. Press the HOME button without disturbing its HOMED location. Once the button is pressed, you can start interacting with it normally.
-
You can now interact with the environment!