move_group.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:ColumbiaX-Robotics 作者: eborghi10 项目源码 文件源码
def place(self, object_name, location=None):
        """Place the named object at a particular location in the environment or somewhere safe in the world if location is not provided"""
        result = False
        if location is None:
            result = self._g.place(object_name)
        elif type(location) is PoseStamped:
            old = self.get_pose_reference_frame()
            self.set_pose_reference_frame(location.header.frame_id)
            result = self._g.place(object_name, conversions.pose_to_list(location.pose))
            self.set_pose_reference_frame(old)
        elif type(location) is Pose:
            result = self._g.place(object_name, conversions.pose_to_list(location))
        elif type(location) is PlaceLocation:
            result = self._g.place(object_name, conversions.msg_to_string(location))
        else:
            raise MoveItCommanderException("Parameter location must be a Pose, PoseStamped or PlaceLocation object")
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号