Ask Your Question
0

Joints of my model sway in gazebo

asked 2018-03-27 03:24:12 -0600

jn-chen gravatar image

Hi everyone, the joints of my robot model start to sway when I spawn it in gazebo and then launch its controllers I added previously. Here is the contents of my yaml file:

cambot: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 50
# Position Controllers --------------------------------------- tilt_position_controller:

type: effort_controllers/JointPositionController
joint: tilt
pid: {p: 100.0, i: 0.01, d: 10.0}   pan_position_controller:
type: effort_controllers/JointPositionController
joint: pan
pid: {p: 100.0, i: 0.01, d: 10.0}   lift_position_controller:
type: effort_controllers/JointPositionController
joint: lift
pid: {p: 100.0, i: 0.01, d: 10.0}

And this is the contents of my launch file:

<launch>

<rosparam file="$(find cambot_description)/config/cambot_control.yaml" command="load"/>


<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" ns="/cambot" args="joint_state_controller tilt_position_controller"/> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen"> <remap from="/joint_states" to="/cambot/joint_states"/> </node> </launch>

What am I supposed to do to avoid the sway situation mentioned above?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-03-27 04:10:51 -0600

You first probably want to tweak the controller PID parameters. This can be done at runtime using dynamic_reconfigure. I'd recommend dropping i and d gains to 0 and first adjusting p only. In most cases this adjustment is sufficient to make the robot "behave".

If your robot is hard to simulate correctly (for instance if it has very different masses/inertias of different links), then you might want to look at some other things to tweak as discussed in this Q/A and the links provided there.

edit flag offensive delete link more

Comments

Really appreciate your advice, sir. I do fix the problem by modifying the pid gains (even though I still can't comprehend the concept of pid).

jn-chen gravatar imagejn-chen ( 2018-03-27 07:31:58 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-03-27 03:24:12 -0600

Seen: 48 times

Last updated: Mar 27 '18