Facing some issues when using space-mouse !!
praj441 opened this issue · 6 comments
Hi @zhuyifengzju @ut-rpl-robots
I am facing some issues while using the space mouse to control the Panda Franka robot:
(1) When running the example/run_deoxys_with_space_mouse.py , my robot had a slow free-fall (as if it were happening due to gravity). Is it a normal behaviour when using the space mouse? I think it should not be. I have tested the other examples for different controllers, and they are running fine.
(2) My space mouse has vendor-id=9583 and product-id=50741. Which seems a bit older. Your code does not support this device, but RoboSuite does. I imported the code from RoboSuite, and it does work with deoxys as well. The only issue is that when I pressed the right button of the space mouse, it simply threw an error and exited.
Firstly, is there any reason for removing the support for this device in deoxys?
Secondly, is the right-button behavior required for a real robot?
Hi,
To answer (1): you probably need to tune the control gains (like K_p and K_d). Different franka have different physical parameters, so it is not expected that the default control gains work perfectly across all franka instances.
To answer (2): we can merge pull requests from you for supporting the old device. It's never removed. We just didn't include it since we rarely use old versions of spacemouse. And right-button is to reset the spacemouse control, which is consistent across all the codebase that uses robosuite. How to handle the reset control depends on your use case and you can adjust it accordingly.
Hope this helps.
@zhuyifengzju
Thanks for your response. I am convinced by answer (2).
Regarding answer (1), I am still confused. When I run the example file run_deoxys_with_space_mouse, at line 43, the input to the function robot_interface.control is always going action = [0,0,0,0,0,0,-1], when there is no input from spacemouse. As far as I understand, the position in variable action[0:3] is relative dpos. In that case, the robot should stay in the current position regardless of control gain values. I may be wrong since I am not expert in control theory.
What is your intake in this situation?
The thing is that the osc control is a impedance-based compliant control, which means that the system could behave under-damped, and its compensation for gravity is not perfect. So what happens is that if the control gain is too small, the arm will be pull down by gravity. Also, the action is to specify the delta changes in poses, not tracking the absolute values of the poses, so there might be some drifting happens if the control gain is not configured properly for specific arms. I hope these details help you.
@zhuyifengzju
Thanks for your message. It makes sense to me. I will look into how to tune the gain parameters properly and will post the update here once I am done with it.
@zhuyifengzju Thanks for your message. It makes sense to me. I will look into how to tune the gain parameters properly and will post the update here once I am done with it.
Hello! Have you received any progress in terms of solving this issue? We are currently only tuning the KP parameter, because it the only control parameter in osc-pose-controller.yml. The controller type given by "def get_default_controller_config" in config_utils.py upon the initiation of run_deoxys_with_space_mouse.py is "OSC_POSE." However, simply tuning this didn't give us the result we want and the free fall behavior still stands.
@rosellaliu
I tried tuning the parameters. Currently, I am not working on it, so I can't remember exactly which parameters I changed.
However, my experience was that I tried changing the default parameters a little bit and experimented with them. It has improved the overall smoothness of the control. However, the free fall still existed. Further, I observed that the free fall does not happen if I fix the start position of the robot in a certain range. So, I chose a different start position for the robot. Further, if you continuously give the robot a non-zero control signal from your space mouse, it will work out. The free fall was happening only when there was no signal from the space mouse.
I hope it helps!