- Clone, build and source AMBF's
restructure
branch.
https://github.com/WPI-AIM/ambf/tree/restructure
git checkout -b restructure origin/restructure
git pull
-
Clone this repo outside AMBF source tree e.g. your home folder. Lets call the location of this folder as
<surgical_robotics_challenge>
-
Now run AMBF with the launch file and ADFs from this repo as:
cd <ambf_bin>
./ambf_simulator --launch_file <surgical_robotics_challenge>/launch.yaml -l 0,1,3,4,13,14
This is an example of what the scene should look like (minus the motions of the PSM, Needle etc.):
- To control the PSMs, you can run the following script in a new terminal:
cd <surgical_robotics_challenge>/scripts/
python gui_based_control.py
You should see GUI's with sliders to control the Pose of each PSM. Move around the PSMs and try to pick the needle.
-
To automatically make the needle move towards a PSMs grasp, you can run the script called
attach_needle.py
while the simulation is running. Once the needle is within the grasping area you can control that specific jaw angle (using the GUI launched above) until it grasps the needle. -
You can press
CTRL+R
to reset the simulation. PressP
key to toggle between mouse pan using the LEFT click or mouse picking.
The code in the scripts folder allows the dVRK MTMs or Geomagic Touch / Phantom Omni to control the simulated PSMs. First run the AMBF simulation as described in step 3.
Next run the dvrk-ros
application for the dVRK MTMs
or the ROS application for the Geomagic Touch/Phantom Omni
. Here is where you can find the relevant code for them:
a. https://github.com/jhu-dvrk/dvrk-ros (dvrk-ros)
b. https://github.com/WPI-AIM/ros_geomagic (geomagic_touch/phantom_omni)
Then run one of the corresponding python scripts:
a. scripts/mtm_multi_psm_control.py (For MTMs)
b. scripts/geomagic_multi_psm_control.py (For Geomagic Touch/Phantom Omni)
Refer to the README in the scripts folder for further information