JenniferBuehler / moveit-pkgs

My collection of packages related to MoveIt!
BSD 3-Clause "New" or "Revised" License
7 stars 15 forks source link

Cube not spawned on the table after running fake object recognition. #2

Open Shivam7Sharma opened 2 years ago

Shivam7Sharma commented 2 years ago

When I run rosrun gazebo_test_tools fake_object_recognizer_cmd cube1 1 the cube object is spawned on the ground like this:

Screenshot from 2021-12-04 12-57-25 But when I run : rosrun gazebo_test_tools fake_object_recognizer_cmd cube1 0 the cube is spawned on the table but the table is red now. I believe I followed all the tutorials required till the step 6 of Object information pipeline tutorial

JenniferBuehler commented 2 years ago

Hello,

Please refer to the whole of this tutorial which has a section about this

Shivam7Sharma commented 2 years ago

Thank you for your reply! I referred to the same tutorial but faced the same problem. I didn't complete the optional steps in Jaco-arm-pkgs and gazebo-pkgs, but I followed all other instructions in all of these three links.

I thought of doing the tutorials because I am going to use this plugin for vision-based robotic grasping in a panda robot. My friend was able to use the plugin for a panda robot but he didn't do the tutorials. Ig tutorials needs updating.

JenniferBuehler commented 2 years ago

Hi, Hmmm it could be that the tutorials need updating. I will see when I get around to test it again, hopefully Monday. In the meantime you can try if the gazebo-pkgs tutorial works.

a137755952 commented 1 year ago

Hi, I am meeting the same problem, is there any solutions now?

bryceikeda commented 1 year ago

A quick fix is to add to this group of lines https://github.com/JenniferBuehler/moveit-pkgs/blob/2e06cc2312417c45af8cd8698f6956def4db8ee3/moveit_object_handling/src/ObjectMessageGenerator.cpp#L311-L313

add

geometry_msgs::Pose pose;  
pose.position.x = 0;  
pose.position.y = 0;  
pose.position.z = 0;  
pose.orientation.x = 0;    
pose.orientation.y = 0;   
pose.orientation.z = 0;  
pose.orientation.w = 1;  
obj.pose = pose;

Since the primitive positions are relative to the world frame, they will need to spawned accordingly.

This is to take into account the updated pose field in moveit_msgs/CollisionObject https://github.com/ros-planning/moveit/pull/3176#issue-1305755067

JenniferBuehler commented 1 year ago

Hi, and thanks @bryceikeda for the response. I haven't had time to update these packages in too long! Hopefully in the next few months I get a dedicated time slot just to bring my github stuff up to speed :)

@a137755952 can you confirm if this worked so I can close the issue?