Skip to content

Get msgs from Planning Scene - #663

Merged
v4hn merged 4 commits into
moveit:kinetic-develfrom
velveteenrobot:get-msgs
Nov 23, 2017
Merged

v4hn merged 4 commits into
moveit:kinetic-develfrom
velveteenrobot:get-msgs

Conversation

@velveteenrobot

Copy link
Copy Markdown
Contributor

Description

Issue #644

  • Added functionality to get CollisionObject(s) and ObjectColor(s) and the Octomap as ROS msgs from the Planning Scene object. This involved replacing existing private methods for those functions.
  • Also added functions to get AttachedCollisionObject(s). For this I added to conversions.h/.cpp
  • Note: the format for getCollisionObjects() basically involves getting the IDs for all of the objects and then iterating through the IDs and retrieving each CollisionObject msg separately using its ID. For getAttachedCollisionObjects(), it sort of works the opposite way. To get a single AttachedCollisionObject, you retrieve all of the AttachedCollisionObjects and then iterate through all the objects and look for the one with the right ID.
  • If the above doesn't make sense, just ignore it

Checklist

  • [x ] Required: Code is auto formatted using clang-format
  • Extended the tutorials / documentation, if necessary reference
  • Include a screenshot if changing a
  • Optional: Created tests, which fail without this PR reference
  • Optional: Decide if this should be cherry-picked to other current ROS branches (Indigo, Jade, Kinetic)

@davetcoleman
davetcoleman requested a review from v4hn October 19, 2017 04:16

void planning_scene::PlanningScene::getPlanningSceneMsgCollisionObject(moveit_msgs::PlanningScene& scene_msg,
const std::string& ns) const
void planning_scene::PlanningScene::getCollisionObjectMsg(moveit_msgs::CollisionObject& collision_obj,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return a bool in case there's no object with the specified name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do (probably tomorrow).

}

void planning_scene::PlanningScene::getPlanningSceneMsgOctomap(moveit_msgs::PlanningScene& scene_msg) const
void planning_scene::PlanningScene::getAttachedCollisionObjectMsgs(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

}
}

void planning_scene::PlanningScene::getAttachedCollisionObjectMsg(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

attachedBodiesToAttachedCollisionObjectMsgs(attached_bodies, attached_collision_objs);
}

void planning_scene::PlanningScene::getOctomapMsg(octomap_msgs::OctomapWithPose& octomap) const

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@velveteenrobot

Copy link
Copy Markdown
Contributor Author

Finally remembered this. I didn't change the return type for getPlanningSceneMsg, so it's still void while the other getters return bool. If we don't like that they work differently, just get rid of the most recent commit.

@davetcoleman

Copy link
Copy Markdown
Member

Still waiting on @v4hn for a review

@v4hn

v4hn commented Nov 23, 2017

Copy link
Copy Markdown
Contributor

Very sorry for the delay.
Access in the datastructures is not beautiful, I agree...

Thank you for implementing this @velveteenrobot !

Merging.

Should not be back-ported because it breaks API.

@v4hn
v4hn merged commit ea84a9c into moveit:kinetic-devel Nov 23, 2017
@rhaschke rhaschke mentioned this pull request Dec 15, 2017
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Dec 15, 2017
v4hn added a commit that referenced this pull request Dec 18, 2017
@130s 130s added the kinetic PRs to be merged into kinetic branch label Dec 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kinetic PRs to be merged into kinetic branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants