-
Notifications
You must be signed in to change notification settings - Fork 37
Implementing Zero Gravity Mode for Jaco Arms follow up to Issue #34 #47
Comments
Hi Jonathan The arguments to SetGravityVector should be the gravity vector. On movo, the gravity (downward) is oriented in the -Y direction with respect to the Kinova arm base frame. So you would call SetGravityVector (float gravityVector[GRAVITY_VECTOR_SIZE]), with gravityVector=[0.0, -9.81, 0.0]. setGravityVector.argtypes should be [POINTER(c_float)] SetForceControl is an error. Sorry about that... I was writing too fast...I ments Start instead of Set! You start the Reactive Force control with StartForceControl and stop it with StopForceControl. Again, you will have to add those functions to kinova_api_wrapper.py The specific implementation is your choice. Either you modify an existing node (e.g. jaco_joint_controller.py, or you create your own. As a first step, you could do your own script to call to those functions, then you<ll see if you want to join this code as an extra mode in an existing node (e.g. declare specific services to start and stop the reactive force control, and then have a client that calls to this service). I hope this helps |
Hi Martine So I am currently in the process of implementing it, and I am running into some problems. I have added to the Kinova API wrapper and have also added to the Left Arm When I try to run this, I am getting the error: What is causing this error? Thank you! Jonathan |
Hmm okay. well those lines are already called in jaco_joint_controller.py . Since jaco_joint_controller.py is called when the movo initializes, maybe there is a conflict between your code and this code. Can you add your set_control_mode to jaco_joint_controller.py ? |
So we have added code to kinova_api_wrapper.py that implements StartForceControl, StopForceControl, and SetGravityVector. We added code in jaco_joint_controller.py that calls StartForceControl and commented out the line that turns on CartesianControl, which is chosen by default. Code in kinova_api_wrapper.py
code in jaco_joint_controller.py
Upon reboot, the robot does the startup sequence, but does not enter ForceControlMode. Any advice would be appreciated. Ideally we would want to be able to switch ForceControl on and off at runtime, and not need to reboot to change modes. |
Have you modified the code on movo1 and movo2? Both computers have to run the same code... |
Hi,
I hope you are well. I am currently trying to implement the Zero G mode described in issue #34, and I have a few questions.
The first step that was mentioned was to set the gravity vector in the correct orientation using SetGravityVector. I have located this function; however, what should the arguments to this function be for the correct orientation? Moreover for the wrapper, currently I am planning on adding to the movo_joint_interface/kinova_api_wrapper.py by creating a
self.setGravityVector =self.kinova.Ethernet_SetGravityVector
but what would have to go into thesetGravityVector.argtypes
?The second step that was mentioned was to activate the Reactive force control mode by calling SetForceControl; however, I did not find this function. The closest functions I found were StartForceContorl and StopForceControl. How would I go about completing this step of the process?
Finally, where in the pipeline of the system would a script that calls these functions belong? More specifically, after updating the wrapper to include the necessary functions, could I just run a script that calls these functions to activate zero g mode?
Thank you very much for your help!
Best,
Jonathan
The text was updated successfully, but these errors were encountered: