Loading ...
Sorry, an error occurred while loading the content.

Shape Primitives

Expand Messages
  • mighty_max_c
    Hi, I am trying to run the code below: #include DualCoding/DualCoding.h using namespace DualCoding; class ImageParsing : public VisualRoutinesBehavior {
    Message 1 of 2 , Feb 6, 2007
    View Source
    • 0 Attachment
      Hi,

      I am trying to run the code below:

      #include "DualCoding/DualCoding.h"
      using namespace DualCoding;

      class ImageParsing : public VisualRoutinesBehavior {
      public:
      ImageParsing() : VisualRoutinesBehavior("ImageParsing") {}

      void DoStart() {
      VisualRoutinesBehavior::DoStart();
      NEW_SKETCH(camFrame, uchar, sketchFromSeg());
      NEW_SKETCH(ball, bool, visops::colormask
      (camFrame, "pink"));
      NEW_SHAPEVEC(sphere_shapes,
      SphereData,SphereData::extractSpheres(ball));
      }
      };

      #endif

      but I got the following errors.

      ImageParsing.h: In member function `virtual void ImageParsing::DoStart
      ()':
      ImageParsing.h:15: error: no matching function for call to
      `std::vector<DualCodi
      ng::Shape<DualCoding::SphereData>,
      std::allocator<DualCoding::Shape<DualCoding::
      SphereData> > >::vector(std::vector<DualCoding::ShapeRoot,
      std::allocator<DualCo
      ding::ShapeRoot> >)'
      /usr/local/OPEN_R_SDK/include/c++/3.3.2/bits/stl_vector.h:265: error:
      candidates
      are: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp,
      _Alloc>&) [with _T
      p = DualCoding::Shape<DualCoding::SphereData>, _Alloc =
      std::allocator<DualCodin
      g::Shape<DualCoding::SphereData> >]
      /usr/local/OPEN_R_SDK/include/c++/3.3.2/bits/stl_vector.h:252: error:
      std::vector<_Tp, _Alloc>::vector(unsigned int) [with _Tp =
      DualCoding::Sha
      pe<DualCoding::SphereData>, _Alloc =
      std::allocator<DualCoding::Shape<DualCoding
      ::SphereData> >]
      /usr/local/OPEN_R_SDK/include/c++/3.3.2/bits/stl_vector.h:240: error:
      std::vector<_Tp, _Alloc>::vector(unsigned int, const _Tp&,
      typename std::_
      Vector_base<_Tp, _Alloc>::allocator_type&) [with _Tp =
      DualCoding::Shape<DualCod
      ing::SphereData>, _Alloc =
      std::allocator<DualCoding::Shape<DualCoding::SphereDa
      ta> >]
      /usr/local/OPEN_R_SDK/include/c++/3.3.2/bits/stl_vector.h:229: error:
      std::vector<_Tp, _Alloc>::vector(typename
      std::_Vector_base<_Tp, _Alloc>::
      allocator_type&) [with _Tp =
      DualCoding::Shape<DualCoding::SphereData>, _Alloc =
      std::allocator<DualCoding::Shape<DualCoding::SphereData> >]

      I am using GCC version 3.4.4 on cygwin.

      Could you please tell me how to fix the problem with NEW_SHAPEVEC?

      Thanks you,
      Max
    • dst@cs.cmu.edu
      ... There was a problem with SphereData::extractSpheres. It was mistakenly defined to return a vector instead of a vector . I ve
      Message 2 of 2 , Feb 6, 2007
      View Source
      • 0 Attachment
        > I am trying to run the code below:
        >
        > NEW_SHAPEVEC(sphere_shapes,
        > SphereData,SphereData::extractSpheres(ball));

        There was a problem with SphereData::extractSpheres. It was mistakenly
        defined to return a vector<ShapeRoot> instead of a vector<Shape<SphereData> >.
        I've fixed the problem and checked in the new code to CVS.

        Also note that I've just checked in a substantial rewrite and
        simplification of the MapBuilder and Lookout modules. The
        implementation is still incomplete; the scan and track functions
        aren't coded yet. But the basic stuff is working. There will be
        demo code available in "Lab 4" of the Cognitive Robotics class
        by Friday. Also, Ethan recently rewrote the particle filter, so
        that's new too.

        All of this stuff is at tekkotsu.no-ip.org. The version at
        tekkotsu.org is still the stable 3.0 release.

        -- Dave
      Your message has been successfully submitted and would be delivered to recipients shortly.