@@ -515,14 +515,17 @@ class Object_Handler
515
515
516
516
// ToDo: figure out how *.model-size and *.urdf-extend are related
517
517
// ToDo: figure out where the *.model origin is located (top,center,bottom?)
518
+
519
+ // it seems to be correct for the milk_box now
520
+ // is the position of the model origin consistent with the other models?
518
521
collision_object.shapes [0 ].type = geometric_shapes_msgs::Shape::BOX;
519
- collision_object.shapes [0 ].dimensions .push_back (dimensions[0 ]/ 2.0 );
520
- collision_object.shapes [0 ].dimensions .push_back (dimensions[1 ]/ 2.0 );
521
- collision_object.shapes [0 ].dimensions .push_back (dimensions[2 ]/ 2.0 );
522
+ collision_object.shapes [0 ].dimensions .push_back (dimensions[0 ]);
523
+ collision_object.shapes [0 ].dimensions .push_back (dimensions[1 ]);
524
+ collision_object.shapes [0 ].dimensions .push_back (dimensions[2 ]);
522
525
523
- collision_object.poses [0 ].position .x = state_srv.response .pose .position .x ;
524
- collision_object.poses [0 ].position .y = state_srv.response .pose .position .y ;
525
- collision_object.poses [0 ].position .z = state_srv.response .pose .position .z ;
526
+ collision_object.poses [0 ].position .x = state_srv.response .pose .position .x ;// +(dimensions[0]/2.0);
527
+ collision_object.poses [0 ].position .y = state_srv.response .pose .position .y ;// +(dimensions[1]/2.0);
528
+ collision_object.poses [0 ].position .z = state_srv.response .pose .position .z +(dimensions[ 2 ]/ 2.0 ) ;
526
529
collision_object.poses [0 ].orientation .x = state_srv.response .pose .orientation .x ;
527
530
collision_object.poses [0 ].orientation .y = state_srv.response .pose .orientation .y ;
528
531
collision_object.poses [0 ].orientation .z = state_srv.response .pose .orientation .z ;
0 commit comments