diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d51c71cb..ff08426a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,23 +16,38 @@ Please try to include as much information as you can. Details like these are inc * Any modifications you've made relevant to the bug * Anything unusual about your environment or deployment +## Installation of pre-commit checks and hooks +To accelerate the rate of development and to ensure that the code is formatted correctly, we use pre-commit checks and hooks. To install these, please follow the instructions below: + 1. Install packages used to check the code: +```bash +$ sudo apt-get -y install clang-format-10 python3-autopep8 ament-cmake-uncrustify python3-ament-cpplint python3-ament-lint-cmake python3-ament-copyright +$ pip install doc8 +``` + 2. Install pre-commit: `pip install pre-commit` + 3. Configure hook such that it runs on every commit: `pre-commit install` + +You can run pre-commit manually on the repository to check if the code is formatted correctly. +To do so, run `pre-commit run --all-files` in the root of the repository. ## Contributing via Pull Requests Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: 1. You are working against the latest source on the *main* branch. 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your time to be wasted. +3. You have used pre-commit checks to correct any formatting issues. +4. You open an issue to discuss any significant work - we would hate for your time to be wasted. + +**NOTE:** For contributing to the documentation, contribute to the sphinx pages placed in the ethercat_driver_ros2/sphinx folder. To send us a pull request, please: 1. Fork the repository. 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send a pull request, answering any default questions in the pull request interface. -6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. +1. Ensure local tests pass. +2. Commit to your fork using clear commit messages. +3. Send a pull request, answering any default questions in the pull request interface. +4. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. GitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). diff --git a/ethercat_driver_ros2/sphinx/quickstart/installation.rst b/ethercat_driver_ros2/sphinx/quickstart/installation.rst index 3a3b38f3..36676f14 100644 --- a/ethercat_driver_ros2/sphinx/quickstart/installation.rst +++ b/ethercat_driver_ros2/sphinx/quickstart/installation.rst @@ -8,6 +8,34 @@ Installing EtherLab The proposed development builds upon the `IgH EtherCAT Master `_. Installation steps are summarized here: +* Verify that you can run unsigned kernel modules + +Etherlab is a kernel module that is not signed by default. +To allow the kernel to load unsigned modules, you need to disable secure boot. + +Verify if secure boot is enabled (you need to install ''mokutil'' first): + .. code-block:: console + + $ sudo apt-get install mokutil + $ mokutil --sb-state + +it should print: + .. code-block:: console + + SecureBoot disabled + +if it prints: + .. code-block:: console + + SecureBoot enabled + +Then you need to disable secure boot. +To do so: + + 1. reboot your computer and enter the BIOS settings. + 2. In the security tab, disable secure boot. + 3. Save and exit. + * Install required tools: .. code-block:: console diff --git a/ethercat_driver_ros2/sphinx/user_guide/config_generic_slave.rst b/ethercat_driver_ros2/sphinx/user_guide/config_generic_slave.rst index c426c513..3b4ea3ff 100644 --- a/ethercat_driver_ros2/sphinx/user_guide/config_generic_slave.rst +++ b/ethercat_driver_ros2/sphinx/user_guide/config_generic_slave.rst @@ -72,11 +72,11 @@ Each PDO Channel has the following configuration flags: * - :code:`type` - Channel data type. Possible types: :code:`bool`, :code:`uint8`, :code:`int8`, :code:`uint16`, :code:`int16`, :code:`uint32`, :code:`uint32`, :code:`uint64`, :code:`uint64`, :code:`bitN` with N the number of bits required. * - :code:`command_interface` - - **Only for** :code:`tpdo`. Name of the command interface to be used inside :code:`ros2_control`. + - **Only for** :code:`rpdo`. Name of the command interface to be used inside :code:`ros2_control`. * - :code:`state_interface` - - **Only for** :code:`rpdo`. Name of the state interface to be used inside :code:`ros2_control`. + - **Only for** :code:`tpdo`. Name of the state interface to be used inside :code:`ros2_control`. * - :code:`default` - - **Only for** :code:`tpdo`. Default value to be send to the drive if data received on the command interface is :code:`NaN`. + - **Only for** :code:`rpdo`. Default value to be send to the drive if data received on the command interface is :code:`NaN`. * - :code:`mask` - Data mask, to be used with :code:`type` = :code:`bool`. * - :code:`factor`