Thanks ... it works fine now. I took that syntax from an old world file I
found somewhere on the internet...
Sanchit
On Wed, Jul 2, 2008 at 8:16 PM, Nate Koenig <[EMAIL PROTECTED]> wrote:
> Hello,
>
> You're world file is the problem. Here is how you specify a laser fiducial
> id:
>
> <body:...>
>
> <geom:... >
> <laserFiducialId>#</laserFiducialId>
> </geom:...>
>
> </body:..>
>
> -nate
>
>
> On Wed, Jul 2, 2008 at 6:57 AM, Sanchit Sood <[EMAIL PROTECTED]>
> wrote:
> > Hello
> >
> > I'm using player and gazebo svn version 6728.
> >
> > I am trying to use fiducials to identify objects. When I try to get the
> > count of the identified objects using GetCount() method it always returns
> 0,
> > even if the object is just in front of the laser.
> >
> > Another problem is that reading data from laser fails very often with a
> > segmentation fault; but after 2-3 tries it works fine.
> >
> > The relevant portions of code are as follows
> >
> > world file:
> >
> > <model:physical name="box1_model">
> > <xyz>2 0 0.25</xyz>
> > <canonicalBody>box1_body</canonicalBody>
> > <static>false</static>
> >
> > <body:box name="box1_body">
> > <geom:box name="box1_geom">
> > <size>0.35 0.35 0.35</size>
> > <mass>0.01</mass>
> > <visual>
> > <mesh>unit_box</mesh>
> > <size>0.35 0.35 0.35</size>
> > <material>Gazebo/BumpyMetal</material>
> > </visual>
> > </geom:box>
> > </body:box>
> > <fiducial>4</fiducial>
> > </model:physical>
> >
> > laser model:
> > <sensor:ray name="laser_2">
> > <rayCount>180</rayCount>
> > <rangeCount>361</rangeCount>
> > <origin>0.05 0.0 0</origin>
> >
> > <minAngle>-90</minAngle>
> > <maxAngle>90</maxAngle>
> >
> > <minRange>0.1</minRange>
> > <maxRange>8</maxRange>
> > `
> > <controller:sicklms200_laser name="laser_controller_2">
> > <interface:laser name="laser_iface_1"/>
> > <interface:fiducial name="fiducial_iface_1"/>
> > </controller:sicklms200_laser>
> > </sensor:ray>
> >
> > gazebo.cfg
> >
> > driver
> > (
> > name "gazebo"
> > provides ["fiducial:0"]
> > gz_id "fiducial_iface_1"
> > )
> >
> > driver
> > (
> > name "gazebo"
> > provides ["laser:1"]
> > gz_id "laser_iface_1"
> > )
> >
> >
> > Client
> > #include<libplayerc++/playerc++.h>
> >
> > using namespace std;
> > using namespace PlayerCc;
> >
> > PlayerClient robot("localhost",6665);
> > LaserProxy lpl(&robot,1);
> > FiducialProxy fp(&robot,0);
> >
> > int main(){
> > double array[361];
> > for(;;)
> > {
> > robot.Read();
> > for(int i=0;i<361; i++)
> > {
> > array[i]=lpl.GetRange(i);
> > }
> > cout<<fp.GetCount()<<" object(s) detected"<<endl;
> >
> > if(fp.GetCount()!=0)
> > { cout<<"detected"<<endl;
> > return -1;
> > }
> > }
> > }
> >
> > Am I doing something wrong somewhere?
> >
> > Thanks in advance
> > Sanchit
> >
> > -------------------------------------------------------------------------
> > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> > Studies have shown that voting for your favorite open source project,
> > along with a healthy diet, reduces your potential for chronic lameness
> > and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> >
> > _______________________________________________
> > Playerstage-gazebo mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
> >
> >
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Playerstage-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers
>
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo