Change robot's configuration through API C++- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Change robot's configuration through API C++ (/Thread-Change-robot-s-configuration-through-API-C) |
Change robot's configuration through API C++-mFarzanehkaloorazi-01-28-2020 Hi, Is it possible to change robot's configuration (Front/Up/Positive) through C++ API? 我知道我可以阅读配置使用 tConfigconfig; ROBOT->JointsConfig(ROBOT->Joints(),config); But I want to change the config, for example only elbow down, but still be confident that the robot EE has the same Cartesian pose as before! RE: Change robot's configuration through API C++-Albert-01-28-2020 You should do something like this:
Code:
// Calculate all available solutions:
RE: Change robot's configuration through API C++-mFarzanehkaloorazi-01-31-2020 (01-28-2020, 10:58 PM)Albert Wrote:You should do something like this: Hi Albert, I did exactly as you said. now I get an unexpected problem. I have debugged and it seems likeSolveIK_Allsometimes fails. So when I run this code, sometimes (strangely) I get one of these messages: CommunicationproblemswiththeRoboDKAPI or sometimes RoboDKAPIERROR:" " I tried it on two other machines. In one (more powerful) it didn't happen. In another (less powerful) it happened,maybeeven more often. That's why I thought maybe it is a timeout problem? I am not sure. Moreover, I am solving IK in a loop for 136 times. Sometimes, it shows one of these message once and then keeps working as nothing happened, but then after 5+ calls to SolveIK_All, it crashes with these messages. Here is a snippet of the code:
Code:
tJoints newJoints = ROBOT->Joints();
As it can be seen, after 9th target it cannot communicate, therefore no configuration is desirable and then it goes to target 10 and 11 with dragging the problem and finally it crashes. here, the error shows up after target 107 once and after that everything works and finally with no problem the code continues. here, the error shows up after 11 and 17 and not problem all the way to 45 that it crashes! As it can be seen, the problem happens after "Solve-all-started" and before "done". Do you have any idea why this is happening? RE: Change robot's configuration through API C++-Albert-01-31-2020 This is probably a bug. It would be great if you can you provide a Qt project that shows this issue and the RDK file. |