0
$\begingroup$

Rosanswers logo

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:

  1. 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?

  2. 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!


Originally posted by Kashyap.m94 on ROS Answers with karma: 46 on 2018-05-17

Post score: 0


Original comments

Comment by gvdhoorn on 2018-05-17:
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.

Comment by Kashyap.m94 on 2018-05-21:
Is there a way where in I can overcome this lag in the MoveIt, @gvdhoorn ?

Comment by gvdhoorn on 2018-05-21:
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.

Comment by Kashyap.m94 on 2018-05-21:
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.

Comment by Kashyap.m94 on 2018-05-22:
@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?

Comment by Kashyap.m94 on 2018-05-22:
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 @PeteBlackerThe3rd

Comment by gvdhoorn on 2018-05-22:
I can't help you with your script I'm afraid.

the arm doesn't move at all even if i wait for 3-4minutes

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.

Comment by gvdhoorn on 2018-05-22:
Something like jog_arm fi.

Comment by Kashyap.m94 on 2018-05-25:
@gvdhoorn Hey, as suggested by you, I am launching my RViz launch file and then the jog_arm. But there seems to be a stream of messages that keeps flowing into RViz, even if i am not giving any input, because in the status tab in RViz, changed goal state keeps printing continuously (c)

Comment by Kashyap.m94 on 2018-05-25:
(c) which i feel is causing the lag. It's like the commands i give is stored in a buffer, and is then being sent to the RViz, thus causing the delay. Is there a way by which I can reduce the messages size being sent in order to either reduce the delay or totally eliminate it?

Comment by gvdhoorn on 2018-05-25:
I would advise you to post new questions for new topics. This is not a regular forum where we can just keep posting arbitrary things. It'll become very messy, very quickly.

Comment by gvdhoorn on 2018-05-25:
Also: please don't close questions when they've been answered. Just tick the checkmark left to the answer, like you've already done. That is enough.

Comment by gvdhoorn on 2018-05-25:
re: jog_arm: this pkg implements a completely different way of controlling your robot. If you have questions about it, please post a new question so the author of that package can help you.

Comment by Kashyap.m94 on 2018-05-25:
alright, thanks. Will keep the instructions in mind the next time

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Regarding point 2. This is nothing to do with the sensitivity of the controller, and everyone to do with how quickly the messages are being published by the controller.

If you could update your code so that it detects the transition from a button being off to on instead of just checking if the button is on then you should be able to get exact 0.1 radian movements.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-05-17

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-05-17:
I believe the accepted terminology is "edge triggered" vs "level triggered".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.