Home | Tutorials | Wiki | Issues
Ask Your Question
0

use kuka lwr in gazebo

asked 2013-11-22 05:00:38 -0500

Qiang gravatar image

Hi, all

I want to use kuka in gazebo. Because kuka lwr has 7DOF. I try to use PR2 controller. rarmcontroller to control kuka. Is it right, or I have to write my own controller.

I am using ROS with gazebo. So I follow the tutorial in ROS groovy. to move kuka which originally control pr2 right arm. What I do is just change the joints name. goal.trajectory.jointnames.pushback("rshoulderpanjoint"); goal.trajectory.jointnames.pushback("rshoulderliftjoint"); goal.trajectory.jointnames.pushback("rupperarmrolljoint"); goal.trajectory.jointnames.pushback("relbowflexjoint"); goal.trajectory.jointnames.pushback("rforearmrolljoint"); goal.trajectory.jointnames.pushback("rwristflexjoint"); goal.trajectory.jointnames.pushback("rwristrolljoint");

to

goal.trajectory.joint_names.push_back("right_arm_0_joint");
goal.trajectory.joint_names.push_back("right_arm_1_joint");
goal.trajectory.joint_names.push_back("right_arm_2_joint");
goal.trajectory.joint_names.push_back("right_arm_3_joint");
goal.trajectory.joint_names.push_back("right_arm_4_joint");
goal.trajectory.joint_names.push_back("right_arm_5_joint");
goal.trajectory.joint_names.push_back("right_arm_6_joint");

the building is succesful, The problem is (1)the kuka robot will move, but not follow my desired path(two predefined points). (2)when I start gazebo simulation, the kuka can not keep zero position(I do not know how to keep the robot as my predefined position). Several joints will be down the ground because the gravity.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-11-22 08:25:16 -0500

Qiang gravatar image

Thanks for your quick answering. I want to ask where I can define I am using positioncontrollers/JointTrajectoryController. I am not quite sure whether I used effortcontroller. I just start to use ros+gazebo. I only know I can set controller and its parameters in the config file. e.g. controller.yaml. Now what I am using is: rarmcontroller: type: "robotmechanismcontrollers/JointTrajectoryActionController" joints: - rightarm0joint - rightarm1joint - rightarm2joint - rightarm3joint - rightarm4joint - rightarm5joint - rightarm6joint gains: rightarm0joint: {p: 21000, d: 0, i: 10} rightarm1joint: {p: 50000, d: 0, i: 10} rightarm2joint: {p: 50000, d: 0, i: 10} rightarm3joint: {p: 50000, d: 0, i: 10} rightarm4joint: {p: 50000, d: 0, i: 10} rightarm5joint: {p: 50000, d: 0, i: 10} rightarm6joint: {p: 50000, d: 0, i: 10} jointtrajectoryactionnode: joints: - rightarm0joint - rightarm1joint - rightarm2joint - rightarm3joint - rightarm4joint - rightarm5joint - rightarm6joint constraints: goaltime: 0.6 rightarm0joint: goal: 0.01 rightarm1joint: goal: 0.01 rightarm2joint: goal: 0.01 rightarm3joint: goal: 0.01 rightarm4joint: goal: 0.01 rightarm5joint: goal: 0.01 rightarm6joint: goal: 0.01

I check my gazebo version which I get from the groovy ros-reporitory which is 1.5.0.

Best, Qiang

edit flag offensive delete link more

Comments

I haven't worked with the pr2_controller_manager so I don't know how to configure things there... if you are starting and want to work with gazebo/ros and not with the pr2, I would suggest using the newer gazebo version (installation instruction from the wiki: http://gazebosim.org/wiki/Tutorials/1.9/Installinggazeboros_Packages) to get rid of pr2 related stuff... You should then first do the Tutorials about ros integration if you have problems after that I'm willing to help ;)

evilBiber gravatar imageevilBiber ( 2013-11-22 08:51:21 -0500 )edit

Thanks. I prefer to work in the current version and try to write my own controller. This is also a good practice because I still a beginner user of ros+gazebo. I will back to you once I update my system.Thank again!

Qiang gravatar imageQiang ( 2013-11-22 09:32:22 -0500 )edit
0

answered 2013-11-22 08:00:58 -0500

Hi,

This sounds like you have a Problem with the configuration of your pid-controller and/or mass and effort of your joints...

if you need physical correctness it might be hard to configure this... if you don't need you could try to use a position_controllers/JointTrajectoryController instead of the effort_controller which should move to the right positions and isn't that hard to configure...

which gazbeo version are you using? From version 1.9 upwards you can use ros_controll and gazebo_ros_pks and their simple-controller-manager for simple FollowJointTrajectory calls as long as no Joints have more that one DOF. (The simple-controller-manager is basically the same as the PR2-Controller but not that specific to a robot). It might also be a good Idea to take a look at the moveit! Project but you will need working JointTrajectoryController for that...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-11-22 05:00:38 -0500

Seen: 1,190 times

Last updated: Nov 22 '13