This project is a plugin for Asynchronous Multibody Framework (AMBF) developed by Munawar et al. This plugin will enable users to communicate with AMBF simulation using Collaborative Robotics Toolkit(CRTK).
Please visit here for the CRTK docmuentation.
Lets call the absolute location of this package as <plugin_path>. E.g. if you cloned this repo in your home folder, <plugin_path> = ~/ambf_crtk_plugin/
OR /home/<username>/ambf_crtk_plugin
.
git clone git@github.com:LCSR-CIIS/ambf_crtk_plugin.git
cd ambf_crtk_plugin
mkdir build && cd build
cmake .. -DBUILD_PLUGIN_WITH_ROS=False
make
A simple package.xml has been included in this repository to enable catkin to find and build it <plugin_path> should be located within catkin_ws/src/
.
cd <catkin_ws>
catkin build ambf_crtk_plugin
Follow the instruction in crtk_msgs and don't forget to source it.
source catkin_ws/devel/setup.bash
You can test this plugin on the example by:
<ambf_exe_dir> ---> e.g. ~/ambf/bin/lin-x86_64
You are required to specify configuration file such as example/CRTK_config.yaml
:
cd <ambf_exe_dir>
./ambf_simulator --plugins <plugin_path>/build/libambf_crtk_simulator_plugin.so --conf <plugin_path>/example/CRTK_config.yaml
You can also define plugin in your launch.yaml
:
plugins: [
{
name: CRTK,
filename: libambf_crtk_simulator_plugin.so,
path: <plugin_path>/ambf_crtk_simulator_plugin/build
}
]
You can specify plugin in your ADF file as follows:
plugins: [
{
name: CRTK,
filename: libambf_crtk_model_plugin.so,
path: <plugin_path>/ambf_crtk_model_plugin/build
}
]
crtk_config: <path_to_your_configuration_file>
You can specify plugin in your ADF file as follows:
plugins: [
{
name: CRTK,
filename: libambf_crtk_object_plugin.so,
path: <plugin_path>/ambf_crtk_object_plugin/build
}
]
crtk_config: <path_to_your_configuration_file>
You are required to specify your custom made configuration file to specify what kind of objects you want to monitor/control with which CRTK command.
# Interfaces used for this plugin
interface:
- REMS/Research
- Robot
- Atracsys
# For Interface "REMS/Research"
REMS/Research:
measured_cp:
# Additonal namespace
# rostopic name will be "REMS/Research/delta/measured_cp"
namespace: delta # <- This option is optional
# Name of Rigidbody in AMBF
rigidbody: Endoscope Tip
measured_js:
# Name of joints in AMBF
joints:
- carriage3_joint
- carriage1_joint
- carriage2_joint
- roll_joint
measured_cf:
# Name of Rigidbody in AMBF
rigidbody: Endoscope Tip
Robot:
servo_cp:
# Name of Rigidbody in AMBF
rigidbody: Endoscope Tip
servo_jp:
# Name of joints in AMBF
joints:
- carriage3_joint
- carriage1_joint
- carriage2_joint
- roll_joint
servo_cf:
# Additonal namespace
# rostopic name will be "Robot/compliance/servo_cf"
namespace: compliance # <- This option is optional
# Name of Rigidbody in AMBF
rigidbody: Endoscope Tip
Atracsys:
servo_cp:
# Name of Rigidbody in AMBF
rigidbody: Endoscope Tip
In this example, there will be the following rostopics:
/REMS/Research/delta/measured_cp
/REMS/Research/measured_js
/REMS/Research/measured_cf
/Robot/servo_cp
/Robot/servo_jp
/Robot/compliance/servo_cf
/Atracsys/servo_cp
Please refer to Surgical Robotics Challenge and use the following command to use it for SRC:
ambf_simulator --launch_file ../surgical_robotics_challenge/launch.yaml -l 0,1,2,3,4,5 --plugins ./build/libambf_crtk_simulator_plugin.so --conf example/SRC_config.yaml
You can use the following example:
ambf_simulator -a ../3D-Slicer_ROS_Module_with_AMBF/AMBF_Plugin_3DSlicer/ADF/galen.yaml --plugins ./build/libambf_crtk_simulator_plugin.so --conf example/CRTK_config.yaml
You can use the following example to use model plugin for dvrk:
ambf_simulator --launch_file launch.yaml -l 0,1,2
Please refer to AMBF helper for installation procedure and how to debug the plugins.