Link to project website: https://mrsdprojects.ri.cmu.edu/2020teama/
- Install ROS (please use ros-kinetic)
- Install dVRK simulation evironments
$ sudo apt-get install libxml2-dev libraw1394-dev libncurses5-dev qtcreator swig flite sox espeak cmake-curses-gui cmake-qt-gui libopencv-dev git subversion gfortran libcppunit-dev
$ sudo apt-get install qt5-default
$ sudo apt-get install python-catkin-tools
$ source /opt/ros/kinetic/setup.bash
$ mkdir -p ~/catkin_ws/src
#Change [catkin_ws] to whatever name you want
$ cd ~/catkin_ws/
$ catkin init #This creates a hidden .catkin_tools directory in the specified workspace.
$ cd ~/catkin_ws/src
$ git clone https://github.com/jhu-cisst/cisst-saw --recursive
$ cd ~/catkin_ws
$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
# At this point you might see there things that are still missing from the package "build", "devel". These things would be built in the next step.
$ catkin build #This might take a while
$ source devel/setup.bash
$ cd ~/catkin_ws/src
$ git clone https://github.com/jhu-dvrk/dvrk-ros
$ git clone https://github.com/jhu-dvrk/dvrk-gravity-compensation
$ cd ~/catkin_ws
$ catkin build
$ cd src
$ git clone https://github.com/biorobotics/Medical-DVRK-AR.git
$ cd ~/catkin_ws
$ catkin build
- install open3d version 0.7.0
your_workspace/
build/
devel/
logs/
src/
cisst-saw/
dvrk-gravity-compensation/
dvrk-ros/
Medical-DVRK-AR/
config/
data/
launch/
src/
srv/
:
[blablablabla]
:
First terminal:
$ roscore
Second terminal:
$ source ~/your_workspace/devel/setup.bash
$ roslaunch medical_dvrk_ar dvrk_arm_rviz.launch arm:=PSM1
Press Power-On, then Home
Third terminal:
$ rosrun medical_dvrk_ar blaser_sim.py -j ~/your_workspace/src/Medical-DVRK-AR/config/blaser_SIMULATED.json
In Rviz: After launching Rviz, add in the following two rostopics to visualize the results 1)pointcloud2 2)makerarray.
- Add the .stl file in the "data/" folder.
- Edit "/config/blaser_SIMULATED.json" line:47(mesh_resource) to the new .stl file path.
- Run blaser_sim.py .
- Run "python Modeling/pc_sticher.py" to start listener.
- Add the "Pointcloud2" topic by the name "organ_3d_point_cloud".
- Run any robot control script under the dvrkPlanner folder.
- cd /your_file_path/src/Medical-DVRK-AR/src/medical_dvrk_ar/Modeling/
- python3 visualize_points_norm.py --path '../../../data/60degree_norm.npy'
- you can change '60degree_norm.npy' to '80degree_norm.npy' which contain more norm vectors
- In Rviz choose ADD > ADD by topic > the pose array msg
- In Rviz choose ADD > ADD by topic > the point cloud2 msg
- cd /your_file_path/src/Medical-DVRK-AR/src/medical_dvrk_ar/Modeling/
- python stiffness_map.py --path /path-to-local-repo/Medical-DVRK-AR/data/xyz_for_stiffness_est.npy --map_type b
- If you want a strictly binary stiffness map, it is "--map b". If you want create a normalized heat map, it is "--map h".
- The liver with tumors (red) should pop up in matplotlib
- check the genetrated file "points_with_stiffness.npy" in /Medical-DVRK-AR/data folder
- cd /your_file_path/src/Medical-DVRK-AR/src/medical_dvrk_ar/Modeling/
- python3 visualize_stiffness.py --path /path-to-local-repo/Medical-DVRK-AR/data/points_with_stiffness.npy
- In Rviz, add Pointcloud2 in liverStiffness topic, you should see a "grey blue" liver
- Change the "size" to 0.0005, you should see the "red" tumor
Please first install scikit-learn==0.20 (Previous version may not have the module we need)
- run roscore
- launch dvrk psm arm with command mentioned above
- run blaser_sim.py with command mentioned above
- The gaussian process palpation is in the dvrkPlanner fold
$ python gp.py --path ~/your_workspace/src/Medical-DVRK-AR/data/palpation_path_25rows_25cols.npy --dest ~/your_workspace/src/Medical-DVRK-AR/src/medical_dvrk_ar/dvrkPlanner/