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

how to use "Sendcartesianpositioncommand" #7

Open
AsmaRoshaan opened this issue May 1, 2019 · 10 comments
Open

how to use "Sendcartesianpositioncommand" #7

AsmaRoshaan opened this issue May 1, 2019 · 10 comments

Comments

@AsmaRoshaan
Copy link

Hi all,
Can you tell me how to run this command in Matlab? I have used sendcartesianvelocity command in for loops and it is working but I don't know how to use command for carstesian position control. Any help would be highly appreciated.
Thanks

@nsaif-kinova
Copy link

Hello,
Please refer to https://github.com/Kinovarobotics/matlab_Kinovaapi_wrapper/blob/master/JACO2Communicator/testJacoComm.m

%% Send cartesian positions
setPositionControlMode(jc);
CartPosCmd = [0.05 ; 0 ; 0 ; 0 ; 0 ; 0];
sendCartesianPositionCommand(jc,CartPosCmd)

@AsmaRoshaan
Copy link
Author

Thanks for replying. I have already trued this command. Jaco isn't responding to it. That's why I asked this question. What could be the problem. Whenever I send this command, Nothing happens and jaco stops reacting to other commands too. Then I have to restart everything.

@nsaif-kinova nsaif-kinova reopened this May 1, 2019
@nsaif-kinova
Copy link

Hello,
Please send the arm to Home position and try again.
You can refer to "My robot is in angular mode and it will not switch back to Cartesian mode? However, when I send the robot back to its HOME position, it will switch back to Cartesian mode" page 67 https://www.kinovarobotics.com/sites/default/files/UG-009_KINOVA_Gen2_Ultra_lightweight_robot_User_guide_EN_R02.pdf

@AsmaRoshaan
Copy link
Author

Hi Nasif
I am sorry if I am not explaining it right. I have tried what you have suggested. I have sent the robot back o home position and it starts working with other commands, but when I send this cartesian position control command, it doesn't reacts, and don't execute any other command after that. then I have to send it back to home position.

@AsmaRoshaan
Copy link
Author

And I would also like to mention that I am using it with ethernet connection. Not with the USB .

@AsmaRoshaan
Copy link
Author

Ok. Now I get it. This command is working with the usb connection but not with ethernet connection. How can I solve this problem?

@nsaif-kinova
Copy link

Hello,
You need to load the DLL files for the Ethernet, please remember this package is only a wrapper around our API, please edit the below part in this file : https://github.com/Kinovarobotics/matlab_Kinovaapi_wrapper/blob/master/JACO2Communicator/JACO2SDK/JacoSDKWrapper.cpp

        commandLayer_handle = LoadLibrary("CommandLayerWindows.dll");
//         For Ethernet control choose CommandLayerEthernet.dll
//         commandLayer_handle = LoadLibrary("CommandLayerEthernet.dll");

@AsmaRoshaan
Copy link
Author

I have updates the DLL files and I was using the jaco with ethernet connection and it was working just fine. Only this command doesn't work. I can not figure out why !!

@nicoponf
Copy link

nicoponf commented Nov 8, 2021

Hello, has anyone resolved this problem ?
What I want to do is make the robot follow 2 or 3 points after another. I am trying to use also the sendCartesianPositionCommand() function, but I have the same behavior, the robot goes to the first point ( note that it is a relative position to the current one ), and then the robot does not respond anymore to any function or method, except goToHomePosition() and setTorqueControlmode().
Then it is necessary to reinitialize it. It seems that initializing the fingers with calibrateFingers() makes the robot able to respond again to other control functions. Though this is a workaround and I would like to resolve the problem.
Also an idea about what and where the problem could be would be helpful !

@nicoponf
Copy link

I found a solution to this problem,

It seems the hand mode was not properly set in this function. To resolve this problem, add
pointToSend.Position.HandMode = HAND_NOMOVEMENT;
right after the following line

pointToSend.Position.Type = CARTESIAN_POSITION;

and recompile the mex file. This should make it work.

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

3 participants