A framework for integrating the AMBF (Asynchronous Multi-Body Framework) RAVEN-II surgical robot with CRTK API support to simulate real RAVEN-II behavior with 1000Hz control execution and publishing the RAVEN State topic.
⚠ Note: Currently, this framework only supports the left arm of RAVEN-II (GOLD arm).
Ensure that you have the RAVEN-II Package installed and running on your system.
Ensure that you have the AMBF simulator installed and running on your system.
Open a terminal and run the following command:
cd ~
git clone https://github.com/lbyng/raven2-ambf-crtk.git
To ensure the base-link of RAVEN-II is parallel to the ground, replace the RAVEN-II model in the AMBF with the model provided in this repository. For example, if your AMBF model path is:
~/ambf/ambf_models/meshes/blender_afmb/raven_2
Then copy the model files from the repository into that folder:
cp -r ~/raven2-ambf-crtk/raven_models/* ~/ambf/ambf_models/meshes/blender_afmb/raven_2/
Launch the AMBF simulator with the updated RAVEN-II model by executing:
~/ambf/bin/lin-x86_64/ambf_simulator -a "/home/sean/ambf/ambf_models/meshes/blender_afmb/raven_2/raven_straight.yaml"
If everything is set up correctly, you should see the AMBF RAVEN-II running.
To simplify launching the simulator, add an alias in your .bashrc
file:
# Open ~/.bashrc in a text editor
nano ~/.bashrc
# Add the following alias at the end of the file:
alias ambf-raven2="~/ambf/bin/lin-x86_64/ambf_simulator -a '/home/sean/ambf/ambf_models/meshes/blender_afmb/raven_2/raven_straight.yaml'"
# Save and exit (Ctrl + X, then Y, then Enter)
Reload the .bashrc
file to apply changes:
source ~/.bashrc
Now, you can start AMBF RAVEN-II anytime by simply typing:
ambf-raven2
Once AMBF is running, start the RAVEN-II framework by executing:
python3 ~/raven2-ambf-crtk/main.py
At this point, the AMBF RAVEN-II should be running as if it were a real RAVEN-II robot.
You can control the RAVEN-II arm using a keyboard. Follow these steps:
First, ensure that AMBF is running:
ambf-raven2
Then, launch the RAVEN-II AMBF CRTK Framework:
python3 ~/raven2-ambf-crtk/main.py
Now, start the keyboard control interface:
python3 ~/raven2-ambf-crtk/keyboard_controller.py
-
The current version only allows one key input at a time for stability.
-
To modify velocity settings, edit the file:
~/raven2-ambf-crtk/keyboard_controller.py
At the beginning of this script, you can adjust the velocity variables for each joint.
For any questions or discussions, reach out via GitHub Issues or email the maintainers.