hey sam,
Hope you have got this working by now.
I was finally able to run this. I guess the issue over here is computation speed (I guess). As I made no other significant changes which have affected this. I didn't open rviz for the last time. I am using 2.93Ghz Quad core i3 processor,2GB RAM ,nVidia GeForce 9600M GT, ROS electric on Ubuntu 11.10
Make sure that stereo camera is able to see the table and object (cup) on it. The rviz should look sth like :
If it does not see the table on the pipeline terminal it will print:
[ INFO] [1340007291.143192424, 526.884000000]: Tabletop detection service called; waiting for a point_cloud2 on topic /narrow_stereo_textured/points2
[ INFO] [1340007291.726868962, 526.937000000]: Point cloud received after 0.053000000 seconds; processing
[ INFO] [1340007292.465272028, 527.018000000]: Input cloud converted to base_link frame after 0.134000000 seconds
[ INFO] [1340007292.465797253, 527.018000000]: Starting process on new cloud in frame base_link
[ INFO] [1340007292.480850283, 527.019000000]: Step 1 done
[ INFO] [1340007292.481365595, 527.019000000]: Filtered cloud only has 0 points
[ INFO] [1340007292.486792836, 527.020000000]: In total, segmentation took 0.136000000 seconds
[ERROR] [1340007292.498026677, 527.020000000]: Segmentation service returned error 2
Here are the exact steps which I followed:-
- roscore
- roslaunch pr2_gazebo pr2_empty_world.launch
-
rosservice call laser_tilt_controller/set_periodic_cmd '{ command: { header: { stamp: 0 }, profile: "linear" , period: 3 , amplitude: 1 , offset: 0 }}', not needed as it uses narrow stereo camera - roslaunch gazebo_worlds table.launch
- rosrun gazebo spawn_model -gazebo -file `rospack find gazebo_worlds`/objects/coffee_cup.model -model coffee_cup -x 0.7 -z 0.6
- Put the arms on side (outside the view of the
laser scane camera)
with help of http://ros.org/wiki/pr2_simulator/Tutorials/Teleop%20PR2%20arm%20in%20simulation - roslaunch pr2_tabletop_manipulation_launch pr2_tabletop_manipulation.launch stereo:=true
As in Bringing up the PR2 pipeline : I didn't set
set use_slip_controllers:=true in
pr2_tabletop_manipulation_launch pr2_tabletop_manipulation.launch as it was giving an error like
Machine [c1] already added and does not match duplicate entry
Also I created a database with household_objects-0.5_electric_prerelease_3.backup - Finaly ran the code for simple pick and place
It was able to pick the cup and move it, while placing the cup I guess it slipped out, but thats good enough. I will now try to run it on multiple machines for better speed.
Edited : corrected the cause of error
as of now I don't know the simple thing of how to rotate the stereo cameras.
I have posted this at : http://answers.ros.org/question/36680/changing-the-stereo-camera-angle-in-pr2-simulation/
Hope you can help
Edited : I got the answer (of how to position the stereo camera).
cheers
hey sam, I am also facing the same problem, figured out a solution yet?