ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

visualizing 3D objects from household_objects_database and grasp playpen dataset

asked 2011-08-14 13:26:12 -0600

vincent gravatar image

updated 2011-08-15 13:37:43 -0600

Hi there,

As said in the subject line, I want to find a way to visualize the objects from household_objects_database, and from grasp playpen dataset (which is in .bag format).

I looked up the threads in ROS community and there exists one solution on the household database. From this thread, http://answers.ros.org/question/706/household_database-visualization, it appears that someone had made a 'urdf' copy of the household_objects_database, then we could try spawning the objects in gazebo from those urdf files.

Is there some other ways of doing that? And for objects in .bag format, how to visualize that, or say how to import that to gazebo or rviz?(all I know now is I can use rosbag to play back the data and put it in rviz). Is there any existing tool to do that, or I need to do some programming by myself. Any suggestion would help me in getting an idea of where to start. I think this should be helpful to those who want to make use of those two datasets. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-08-15 14:14:47 -0600

hsiao gravatar image

in the grasp_playpen package in Diamondback's sandbox is a file, src/grasp_playpen/draw_database_object.py. If you run it on the command line, and then enter the model_id of the object you wish to visualize, it will draw it in rviz on the "/grasp_markers" Marker topic in "/base_footprint" frame.

That code is in Python, so if you're writing C++ and want to do the same sort of thing programmatically, a good example is (alas, in Electric, not in Diamondback; there's probably an example in Diamondback but I'm not sure exactly where offhand) ghosted_gripper.cpp in pr2_marker_control/src. Look at the getModelMesh function and where it's used in goalCB().

edit flag offensive delete link more

Comments

thx. another question, i was using the graspit-simulator(downloaded from the debs) but couldn't find the interface between ros and graspit. Is there a rosnode I need to start for interface? And is there anyway to import the point cloud from playpen-dataset .bag file to graspit simulator?
vincent gravatar image vincent  ( 2011-08-16 11:54:46 -0600 )edit
i think i found it. "https://code.ros.org/svn/wg-ros-pkg/stacks/graspit_simulator/trunk/graspit_interface/launch/ros_graspit_interface.launch", from the source code, but not included in the debs.
vincent gravatar image vincent  ( 2011-08-16 12:58:14 -0600 )edit
Yup, that's the interface. You can import the object from the playpen dataset as a mesh into the graspit simulator, but not the point cloud. You can visualize the point cloud in rviz, though. For sample code that loads grasp playpen point clouds and ground truth objects and poses and such,
hsiao gravatar image hsiao  ( 2011-08-16 15:01:20 -0600 )edit
look at the graspit_pipeline package in diamondback_sandbox, in src/graspit_pipeline, grasp_playpen_scans_and_models.py and GraspitPipeline.py . (Sorry it's all Python, but hopefully it's understandable enough to translate if you're writing C++.)
hsiao gravatar image hsiao  ( 2011-08-16 15:02:25 -0600 )edit
thx a lot.
vincent gravatar image vincent  ( 2011-08-17 01:02:42 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2011-08-14 13:26:12 -0600

Seen: 836 times

Last updated: Aug 15 '11