Invisible Collision Ocject
Hello, everyone.
I want to add the BOX in the world, and added the box(by getKnownObjectNames()) But, they are invisible, so I can see they fron RViz2.
- Ubuntu 22.04.2 LTS
- ROS2 Humble
Mesh files from xacro/stl is visible... I cannot understand why BOX is invisible.
moveit_msgs::msg::CollisionObject obj;
obj.header.frame_id = mg->getPlanningFrame();
obj.id = "BOX";
shape_msgs::msg::SolidPrimitive prim;
prim.type = shape_msgs::msg::SolidPrimitive::BOX;
prim.dimensions = {2.0, 2.0, 2.0};
geometry_msgs::msg::Pose pose;
pose.position.x = -2.0;
pose.position.y = -2.0;
pose.position.z = -2.0;
pose.orientation.w = 1.0;
obj.primitives.push_back(prim);
obj.primitive_poses.push_back(pose);
obj.operation = moveit_msgs::msg::CollisionObject::ADD;
moveit::planning_interface::PlanningSceneInterface ps;
ps.applyCollisionObject(obj);