# ros-control joint state

Hi, I am trying to build a my own robot in gazebo following this tutorial

Here is my xacro file in rviz

and I do can move each joint around in rviz. Everything looks so good so far.

Then I want to simulate my robot in gazebo. There is what it looks like before I launch the ros_control.

But when I launch ros_control (I try not to launch gazebo and ros_control together which is recommended in the tutorial because of debugging purpose...) My robot_arm seems being dragged by a mysterious great force and fly high up like a rocket and quickly disappeared in the gazebo world.

My guess is the ros_control node publishes some messages without my awareness. The result of I echoing my Joint_State rostopic is the following

So I find that there is a HUGE VARIATION on the effort and velocity. The position has also very big numbers, but they are quite consistent.

TWO questions: 1, Is it where the bug is? What exactly is going on? 2, Why my robot cannot stand still like it did in rviz? why it always crash down in the gazebo world?

(sry for not posing it directly in the question here because it requires >5 points to upload a file and I just get 1 point now)

I will also post my xacro file link here in case you need it. Thank you in advance.

UPDATE: So I think I locate the bug of the first question. The problem is my PID values in "my_arm_control.yaml" file. They are so big that leads the model to unstable behavior. My current solution is to set P and D to zero. And now my robot can lying on the ground from my observation so far! Some improvement at least....

But I still don't know why it will lie on the ground and why there is no physical collision between each link of the robot, i.e. for example the yellow ball can go inside the blue cylinder.

edit retag close merge delete

Please add upload all images and include all files in your question (use the Preformatted Text button to format the xml). I've given you the karma to do so.

Also: if I may suggest: looking at your github repository, it would seem you are versioning your entire catkin workspace. That is really not recommended. You want to be versioning your packages only. The build and devel dirs are useless, as they are machine-specific.