Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Implementation Strategy #1

Open
mstoelzle opened this issue Mar 1, 2022 · 0 comments
Open

General Implementation Strategy #1

mstoelzle opened this issue Mar 1, 2022 · 0 comments
Assignees

Comments

@mstoelzle
Copy link

mstoelzle commented Mar 1, 2022

This issue shall concisely describe the general, initial implementation strategy. The repository shall use the improved state parametrisation for Piecewise Constant Curvature (PCC) as proposed by (Della Santina, 2020):

https://ieeexplore.ieee.org/document/8961972

It consists of the configuration variables Delta_x, Delta_y and delta L for each segment.

This repository, shall contain the following ROS2 packages:

  • pcc_kinematics_interfaces to contain all ROS2 msg definitions for the kinematics
  • pcc_kinematics_cpp a C++ package containing both libraries and nodes.
  • pcc_kinematics_py a Python package containing both libraries and nodes.

The python package could be either (a) providing python interfaces for the C++ library using pybind11 or (b) be the analogue implementing in numpy of the C++ code

The reason that we aim to provide a C++ implementation is that this repository will likely be used in a variety of research projects, and it also will be running live on the robot. Accordingly, we need to push the computational time to be as fast as possible, to reach high sampling rates.

The library shall provide the following functions / or classes, which can be imported and used in other ROS packages:

  • forward_kinematics(q, s): This function shall receive the configuration variables of the robot q and the running-variable s \in [0,1] and return the pose (e.g. position and orientation) of the center-line at point s. For example, if our robot consists of two segments, forward_kinematics(q, 0.5) -> chi would return the pose of the tip of the first segment in the global reference frame.
  • transformation_segment(q_i) -> T: given the configuration q_i of segment i, this function returns the relative transformation matrix between the base and the tip of the segment
  • transformation_chain(q, s_1, s_2) -> T This function returns the relative transformation matrix between the point s_1 and the point s_2 where s \in [0,1].
  • inverse_kinematics_segment(T) -> q_i: For a given relative transformation between the base and the tip of the segment, returns the estimated configuration of the segment q_i
  • inverse_kinematics(s_list, chi_list) -> q: This function uses inverse_kinematics_segment repetitively to estimate the entire configuration of the robot q from a list of measured poses in the global frame chi at known points s

Then, there are at least two nodes which advertise the forward_kinematics and inverse_kinematics implementations by subscribing to topics and then subsequently publishing the result.

To implement the inverse kinematics in C++, you can take some inspiration from here:
https://github.com/tud-cor-sr/ros2-mocap_optitrack/blob/main/mocap_optitrack_inv_kin/src/InverseKinematics3D.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants