Planning and moving PR2 base/whole robot with moveit [closed]

asked 2014-04-17 17:53:00 -0600

VinceDietrich gravatar image

updated 2014-11-22 17:05:46 -0600

ngrennan gravatar image

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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by VinceDietrich
close date 2014-12-03 10:18:26.122983

Comments

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

est_CEAR gravatar imageest_CEAR ( 2014-11-18 02:20:29 -0600 )edit

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.

VinceDietrich gravatar imageVinceDietrich ( 2014-12-03 10:18:11 -0600 )edit