.. TODO describe docker compose for this part only. Possible create Hardware setup page for each institute.
================
Catkin Workspace
================
This workspace is based on ROS noetic and catkin tools.
Setup
=====
.. important::
You need to model your robots surrounding, so that collisions can be avoided.
.. TODO does this make sense?
You will need to specify the datatype we are currently gathering
.. code-block:: bash
export DATATYPE="your_robot_trajectory_data_type_either_'command'_or_'attained'"
export DATASET_TYPE="'TRAIN'_or_'TEST'"
Additionally, please let us know if you have a gripper attached to the robot.
.. code-block:: bash
export FRANKA_GRIPPER="your_robot_gripper_status_either_'true'_or_'false'"
Once you are comfortable with your workspace set up, especially the collisions map set the environment variable:
.. code-block:: bash
export MOVEMENT="true"
Automated Behavior
==================
After an initialization period of ~30 seconds the pipeline will start:
The robot will cary out motion to generate data.
The command and attained data is posted to the flask http server in the coscine container.
The robot waits 10 seconds and it repeats until a SIGTERM is recieved.
A SIGTERM (e.g. by means of ``docker compose down`` or ``crtl + c``) will gracefully stop ROS.
Then the franka_lock_unlock shutdown will start.
.. note::
The graceful shutdown time has been extended to 30 seconds for this container.
Motion
------
Motion and task of this work are based on `Schneider et al. 2024 `_.
Random Joint Trajectories will be planned and executed to generate data:
.. raw:: html
.. note::
The table and cable duct are modeled as simple boxes so that colisions are avoided. These can be adated to other experiment scenarios.
Panda Autodynamics Package
==========================
Execution
---------
Ensure that all scripts and launchfiles are executable:
.. code-block:: bash
find /app -type d \( -name scripts -o -name launch \) -exec find {} -type f -exec chmod +x {} \;
Run the launch file:
.. code-block:: bash
roslaunch panda-autodynamics panda_auto_dynamics.launch
Run the script:
.. code-block:: bash
rosrun panda-autodynamics panda_auto_dynamics.py
When you need to reset the libfranka communication:
.. code-block:: bash
rostopic pub -1 /franka_control/error_recovery/goal franka_msgs/ErrorRecoveryActionGoal "{}"
This resets the communcation error that occurs when either the NIC is to small, or python code interacts with the library.
Building
--------
This package is created and build with catkin_tools. To build, you might first need to initialize the workspace:
.. code-block:: bash
cd /app/catkin_ws && catkin init
Now you can build the package if you are somewhere in the workspace:
.. code-block:: bash
catkin build panda-autodynamics