This folder is an independent admittance-control module using local IntegratedAdmittanceController (optas-based).
This project received hardware support from the BOTA System.
admittance_entry.py: runtime entry (sim + hardware)controller/integrated_admittance_controller.py: standalone integrated controllercontroller/qp_builder.py: standalone QP buildercontroller/config_schema.py: standalone config schemaconfig/config_admit.yaml: standalone configurdf/meca_robot_with_botaandshaft.urdf: standalone URDFmeshes/: URDF mesh assetshardware/ftsensor.py: force sensor driver
numpypyoptasmecademicpypyyamloptascasadipyserialcrcmecademicpy(hardware mode only)
Install required packages:
pip install optas casadi numpy pyyaml pyserial crc mecademicpy pyoptasQuick check:
python -c "import optas, casadi; print('optas/casadi ok')"If you run in ROS environment, ament_index_python can be used automatically.
In standalone mode, this module falls back to local URDF path from config.
Required:
parameters.urdf_string:- relative path is resolved from
config/folder - default:
../urdf/meca_robot_with_botaandshaft.urdf
- relative path is resolved from
parameters.end_link_name: tracking link for Jacobian/QPparameters.tip_link_name: admittance mount frame used for twist transformparameters.dt: controller step time
QP / limits:
parameters.wp,parameters.wr,parameters.wdq: twist/velocity costsparameters.q_min,parameters.q_max,parameters.dq_max: joint bounds
Admittance:
admittance.force_gain,admittance.torque_gainadmittance.mass,admittance.rot_massadmittance.damping,admittance.rot_dampingadmittance.compliance_offsetadmittance.reduandant_pos_axis,admittance.reduandant_rot_axis(optional)
Simulation:
python admittance_entry.py --mode sim --steps 0Hardware: (Linux)
python admittance_entry.py --mode hardware --steps 0 --robot-ip 192.168.0.100 --sensor-port /dev/ttyUSB0(Windows)
python admittance_entry.py --mode hardware --steps 0 --robot-ip 192.168.0.100 --sensor-port COM3GUI (pure Python tkinter, hardware only):
python admittance_entry.py --mode gui --robot-ip 192.168.0.100 --sensor-port /dev/ttyUSB0Buttons in GUI:
Hand-Guide: enter/stop admittance hand-guiding modeHome: move robot to predefined home joint angles from config (parameters.home_joint_deg)Record: start/stop CSV recordingReplay: replay the latest recorded CSV trajectory using joint points (q1_deg ... q6_deg)
Replay behavior details:
- Replay uses the most recent file in
records/matchingadmittance_record_*.csv(or the file from the latestRecordaction in the current GUI session). - Replay timing follows the recorded
elapsed_scolumn to preserve trajectory timing. - Replay command source is joint angle columns
q1_deg ... q6_deg. - Starting replay automatically stops
Hand-GuideandRecordto avoid command conflicts. Homealso stops replay before moving to the home point.- Press
Replayagain while replay is running to stop playback.
Recording CSV format:
timestamp_unix_s,elapsed_sq1_rad ... q6_radq1_deg ... q6_degfx, fy, fz, mx, my, mz