Manipulator initial position altered after changing from a position_controllers/JointTrajectoryController to a effort_controllers/JointTrajectoryController

asked 2018-03-30 12:31:25 -0500

znbrito gravatar image

updated 2018-04-06 05:24:53 -0500

Hi, I am currently on ROS Kinetic, working on the integration of a Husky and a Robotis Manipulator-H. Right now I have the manipulator working with MoveIt! while standing fixed on top of a Husky robot, all simulated in Gazebo. First of all I was having a problem which was the fact that when I moved the Husky robot (for example, with the teleop keyboard), his dynamics were not correct, i. .e, the front wheels would lift up when I moved him forward and the back wheels would also lift up If I moved him backwards. I research about the possible reasons why this was happening and via this link:

I found out that the fact that I was using a position_controllers/JointTrajectoryController (from the "controller_manager" package) to control the manipulator (via MoveIt!) was afecting my robot's dynamics. The solution was changing this controller to a effort_controllers/JointTrajectoryController (also from the "controller_manager"), which made it possible to move my robot around normally. The only problem is that now, the initial position of the manipulator is a bit odd. The following images show the normal position of the manipulator (when using a position_controllers/JointTrajectoryController) and the position of the manipulator when using a effort_controllers/JointTrajectoryController:

Normal position, when using a position_controllers/JointTrajectoryController: C:\fakepath\Normal_position.png

Altered position, when using a effort_controllers/JointTrajectoryController: C:\fakepath\Altered_position.png

Besides this initial position problem, path planning has equally good (or even perfect) results when using both controller types. Has this initial position any side effect in my system/manipulator/simulation?

Thanks in advance!

P.S.: This post was originated from the previous created by me in GitHub:

edit retag flag offensive close merge delete


What happens when you make the manipulator move to some other pose, then make it move back to the initial state? Does it still end up in the same weird pose? In that case I would think that your PID values are slightly off.

Raskkii gravatar imageRaskkii ( 2018-04-02 06:27:46 -0500 )edit

@Raskkii thanks for your reply. I tried to perform path planning using the MoveIt! plugin for RViz and I can make the manipulator come back to its initial state after moving it to a random state. The problem is that my initial state is this weird position, so it always comes back to the weird position.

znbrito gravatar imageznbrito ( 2018-04-06 05:44:26 -0500 )edit

That's the strange part, I can always perform path planning with 0 error (so I am assuming that my PID controllers are well tuned) but my initial state is weird in the simulation and I don't know why. Does this mean that the PID controllers have nothing to do with MoveIt! planners and they don't use them? I have been told before that the problem should be my PID controllers but I am using the same ones that came in the package that I downloaded from Robotis's Github and I think they work...

znbrito gravatar imageznbrito ( 2018-04-06 05:47:40 -0500 )edit

It wouldn't hurt to try and play around with the PID values to see if they affect anything. If nothing changes then we can at least eliminate the possibility that the PID values are at fault.

Raskkii gravatar imageRaskkii ( 2018-04-06 06:56:33 -0500 )edit

Hmm ok, I will try that!

znbrito gravatar imageznbrito ( 2018-04-07 08:58:57 -0500 )edit