Behavior of SolveIK in C API vs C++ and Python- Printable Version +- RoboDK Forum (//m.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//m.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Behavior of SolveIK in C API vs C++ and Python (/Thread-Behavior-of-SolveIK-in-C-API-vs-C-and-Python) |
Behavior of SolveIK in C API vs C++ and Python-sig.johnnson-01-17-2023 In the C API,Item_SolveIK()is:
Code:
struct Joints_t Item_SolveIK(const struct Item_t* inst, const struct Mat_t* pose, const struct Mat_t* tool, const struct Mat_t* ref) {
This is not the case for the C++ and Python API. (C++ below).
Code:
tJoints Item::SolveIK(const Mat &pose, const Mat *tool, const Mat *ref){
Does the C call behave the same as the Python and C++ API calls? If not, would it work if I just uncommented the relevant lines or were they commented-out due to problems? Update: I think I partially answered my own question here. It looks like struct Mat_t has no ->inv() value, so I think uncommenting would not work at all. Here's some code that might fix only the tool feature. Would this work?
Code:
struct Joints_t Item_SolveIK(const struct Item_t* inst, const struct Mat_t* pose, const struct Mat_t* tool, const struct Mat_t* ref) {
RE: Behavior of SolveIK in C API vs C++ and Python-sig.johnnson-01-18-2023 Update: I answered my own question again... I modified the library and here is the working code. I'm marking this as resolved.
Code:
struct Joints_t Item_SolveIK(const struct Item_t* inst, const struct Mat_t* pose, const struct Mat_t* tool, const struct Mat_t* ref) {
RE: Behavior of SolveIK in C API vs C++ and Python-Albert-01-18-2023 Excellent, thank you for your contribution the the C API! We just pushed this update to the official version of the C API. We made a minor edit to support using a NULL tool, which assumes the pose you provide is already the robot flange. |