Ran
|
Jobs
2
|
Files
55
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
[SW-1466] ability to take joint gains in through a parameter file (#516) ## Change Overview 1. standardizes gain names in the hardware interface to `k_q_p` and `k_qd_p`, same as spot sdk (https://dev.bostondynamics.com/docs/concepts/joint_control/readme) 2. allows taking in `k_q_p` and `k_qd_p` through a a parameter file. If you have a yaml that looks like this ``` /**: ros__parameters: k_q_p: [624.0, 936.0, 286.0, 624.0, 936.0, 286.0, 624.0, 936.0, 286.0, 624.0, 936.0, 286.0, 1020.0, 255.0, 204.0, 102.0, 102.0, 102.0, 16.0] k_qd_p: [5.20, 5.20, 2.04, 5.20, 5.20, 2.04, 5.20, 5.20, 2.04, 5.20, 5.20, 2.04, 10.2, 15.3, 10.2, 2.04, 2.04, 2.04, 0.32] ``` and pass it to the `spot_ros2_control.launch.py` launchfile with the arg `config_file:=<file path>`, these gains will get used in the hardware interface to stream commands. [Because ros2 control hardware interfaces don't have "true" support for parameters, ](https://github.com/ros-controls/ros2_control/issues/347)the gains have to be passed in as a [string through the xacro](https://github.com/ros-controls/ros2_control/blob/cb91599f8/hardware_interface/include/hardware_interface/hardware_info.hpp#L182), so this also adds a helper function to assist with this conversion back to a usable vector. edge case handling: 1. if either of these params isn't set (or no config file is specified) then the default gains are used. 2. if either the gain lists defined in the parameter file is the wrong number of elements, the hardware interface will fall back to using the default gains, and a warning will be logged about this. ## Testing Done * The wiggle arm example has some slightly jerky gripper motion using the default gains. I changed the `k_qd_p` gain for the gripper joint in my parameter file from `0.32` to `1.32` and reran the example, and the gripper looked a lot smoother. * Checked edge case handling manually ### Next steps The function to translate the gains... (continued)
1933 of 3787 relevant lines covered (51.04%)
29.86 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | unittests-python - 11575122233.1 | 9 |
40.05 |
GitHub Action Run | |
2 | unittests-cpp - 11575122233.2 | 46 |
70.33 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|