Lag using XBOX controller
Hey guys,
I am controlling my robot arm with XBOX controller. I have a python
code written for the same and it works successfully and I am able to visualize the movements in RViz and Gazebo.
But currently, I have the following problems:
There is a lag between the time when I give the instructions through the controller and the time when it actually is visualized in RViz and gazebo. Is there any way that I can make sure that the moment I give the instruction through the controller, the action take place and is observed in RViz and gazebo?
The sensitivity of the buttons in the controller is so high that if I press a button (that controls one joint) once, instead of being executed just once, it get executed 4-5 times. For instance, I have the increment step size as 0.1 for each time I press the button, instead of moving 0.1, the joint moves 0.4 or 0.5 or sometimes even more. How can I tackle this problem?
Thanks in advance for your help!
If the 'controlling' you refer to is what you implemented in #q291009, the 'lag' is in MoveIt planning your next motion, and most likely not between the controller and the rest of your system.
Is there a way where in I can overcome this lag in the MoveIt, @gvdhoorn ?
Planning takes time, there is no way around that.
However: I'm wondering why you are using a motion planner if you already know where you want to go (ie: simple increments in joint space). It seems to me that you should be using a trajectory generator, not a full blown motion planner.
It's because I am working on a student project and my task is to demonstrate that each joint is able to move by the commands given by the user.
@gvdhoorn Hey, as you said that planning takes time and there is no way around it, sometimes, despite me giving the input through the controller, the arm doesn't move at all even if i wait for 3-4minutes. Then I close all the terminals and start it again. Is there anything I can do about it?
And many a times, the terminal where I run the python code, just gets stuck after a while and it doesn't even respond to
ctrl+c
. I am not able to exactly know what the problem is. Could anyone of you guys help me? @gvdhoorn@PeteBlackerThe3rdI can't help you with your script I'm afraid.
well, it could be that planning actually failed. You'd have to check for success.
But again: I believe you should look at a trajectory generator, not a motion planner like MoveIt.
Something like jog_arm fi.