Robotics StackExchange | Archived questions

Planning and moving PR2 base/whole robot with moveit

Hey there,

I am new to ROS (using hydro) and trying to move the PR2 in Moveit.

I started the demo:

roslaunch pr2_moveit_config demo.launch

And then used the following commands in a python script (oriented on the pr2 moveit tutorial):

moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('robotcontrol', anonymous=False)

# MOVEIT COMMANDER

robot = moveit_commander.RobotCommander()
scene = moveit_commander.PlanningSceneInterface()
group2 = moveit_commander.MoveGroupCommander("base")          

pose_base = geometry_msgs.msg.Pose()
pose_base.orientation.w = 1.0
pose_base.position.x = -1
pose_base.position.y = -0.5
pose_base.position.z = 0

# Base Does not have any end effector
end_eff = group2.get_end_effector_link()
print("\nend effector:\n")
print(end_eff)
print("\n")

# Does not receive any pose as there is no end effector
#group2.set_pose_target(pose_base)

# So try it with a random joint target
group2.set_random_target()

p = group2.plan()

if not p.joint_trajectory.points:
    print('no plan!')
else:
    group2.execute(p)

But the robot does not move in RVIZ. Anybody an idea how I can plan and execute a movement of the whole robot base? Unfortunately I am not able to use Gazebo due to my computer and graphics card.

Thanks a lot,

Vincent

Asked by VinceDietrich on 2014-04-17 17:53:00 UTC

Comments

What about the topics and frames published? ($rostopic list / $rqt_graph / $rosrun tf view_frames)

Asked by est_CEAR on 2014-11-18 03:20:29 UTC

Thanks for your reply, the question is not relevant for me anymore, even though I did not find a solution for that specific issue. I will close it then.

Asked by VinceDietrich on 2014-12-03 11:18:11 UTC

Answers