a2s-institute / youbot_simulation

Packages to run the KUKA youBot in the Gazebo simulation with ROS
23 stars 42 forks source link

Some controller issues? #5

Closed mazaaa closed 8 years ago

mazaaa commented 8 years ago

Hello,

I'm using the latest commits of mas-group's _youbotsimulation and _youbotdescription, as well as the latest _ros-simulation/gazebo_rospkgs and ros-controls repositories for hydro-devel.

When I start the youBot simulation (_roslaunch youbot_gazeborobot youbot.launch) the arm falls down (as if no joint values are set) and the base moves slightly back and forth. For the arm it's probably just a initial problem because I can move the arm with the controller afterwards. The base still keeps shaking after using the base controller to move the base somewhere else.

In the screenshot you can see the initial arm position: screenshot from 2016-04-08 13 38 29

All I've changed is the "robocup_at_work_2012.launch" file, so that the gazebo gui launches:

...
<include file="$(find gazebo_ros)/launch/empty_world.launch">
...
    <arg name="gui" value="true"/>
...
  </include>
...

During the launch there are two messages which might belong to the problem:

... [INFO] [WallTime: 1460113763.756456] [0.781000] Spawn status: SpawnModel: Successfully spawned model [gazebo_world_model-4] process has finished cleanly ... [INFO] [WallTime: 1460113766.340067] [2.670000] Spawn status: SpawnModel: Successfully spawned model [spawn_robot-5] process has finished cleanly ...

When I turn on debug I get a lot of those messages:

[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]

Any ideas? Thank you for your time

shehzi001 commented 8 years ago

Hi, Arm fall problem: The possible cause of the arm fall is initial position of the robot. which is set to (0,0,0). I think that is wrong. Because when gazebo spawns the model, half of the robot base is already in the ground. Robot, as a solid object, bumps out of the ground, which causes the robot's arm to fall when the controllers and possibly physics is yet not started. Therefore, i set the robot origin to (0,0,0.08), which solves the problem in my case. You can change the arg init_pos_z to 0.08 in launch file (youbot_simulation/youbot_gazebo_robot/launch/youbot.launch).

Base motion problem: I did not look into this problem in detail. But the possible cause can be wrong inertia, friction parameters set in the urdf for the wheels. you can look into this issue (http://answers.gazebosim.org/question/1363/gazebo-model-jittering/) where they discussed this problem. I would also suggest to try to reduce gains inside (youbot_description/urdf/youbot_base/base.gazebo.xacro) which are too high, i think. you can try with kp=1000 and kd=10. You will observe that the robot base is not jittering compared to the scenario with the high gains.

Let me know if these solution work for you without causing any problem on the functionality. I hope you will find it useful. Good luck.

mazaaa commented 8 years ago

Thank you! Your solution works for the arm and definitely improves the base control. For now this solution is perfectly fine. I'll have a look at the wheel friction if I need too.

Cheers

frederikhegger commented 8 years ago

@shehzi001: if those changes fix the problem, can you also create a merge request for this to be included in our fork.

Thanks.

shehzi001 commented 8 years ago

Done. Can you please close this issue. Thanks