From: Edward R. <er...@gm...> - 2009-02-10 12:39:06
|
Hi Sion, I have extracted the necessary things from my config files: world file: define mybeacon model ( fiducial_return 1 size [0.15 0.15] color "red" # other settings ) mybeacon(pose [1.0 1.0 0.0]) define sick_laser laser ( range_min 0.0 range_max 8.0 fov 180.0 samples 181 color "blue" size [ 0.14 0.14 ] fiducialfinder ( # fiducialfinder properties range_min 0.0 range_max 0.7 range_max_id 0.7 fov 90.0 # model properties size [0 0] ) ) position ( name "myrobot" pose [0.000 -1.000 90.000] sick_laser() # other settings ) cfg file: driver ( name "stage" provides ["6665:position2d:0" "6665:laser:0" "6665:fiducial:0"] model "myrobot" ) Hope this helps. Regards, Edward On Mon, Feb 9, 2009 at 10:26 PM, Edward Rankin <er...@gm...> wrote: > Hi Sion, > > What object are you trying to detect? You will need to include the fiducial > id in the properties of the model of any object you want to detect in the > stage environment. The fiducial finder will be need to be set to find the > same id. If you can't solve this by the time I am back at work tomorrow, I > will post more information from my config files then. > > Regards, > > Edward > > > On Mon, Feb 9, 2009 at 9:42 PM, <S.P...@lb...> wrote: > >> John / Edward >> >> Thanks; the NACK problem is no longer there. But I still >> can't seem to either "connect" to or "sense" the beacon. >> For example, I have a robot with a laser, there is a >> beacon right in front of it (within laser range), yet >> there is no result from the Fiducial proxy. >> >> How can I get the robot to recognise when it has "seen" >> the beacon? I want to simulate a search system that can >> recognise these beacons when the robot gets close, then >> store the location of the beacon. But I can't seem to get >> any data from the beacon at all. >> >> I've put the code below; any ideas? >> >> Sion. >> >> from .world: >> #fiducialfinder properties >> fiducialfinder ( >> range_min 0.0 >> range_max 3.0 >> range_max_id 2.0 >> fov 359.0 >> ) >> fiducial_return 1 >> fiducial_key 1 >> >> position >> ( >> name "r0" >> pose [4.0 6.0 45] >> size [0.3 0.3] >> color "red" >> fiducialfinder(range_max 2.0 range_max_id 2.0) >> ) >> >> # create a robot >> pioneer2dx ( name "robot0" color "red" pose [0 0 0] >> hokuyo_laser( samples 181 laser_sample_skip 4 ) >> fiducialfinder(range_max 2.0 range_max_id 2.0) ) >> >> from .cfg: >> # robot 0 >> driver ( name "stage" provides [ "position2d:0" "laser:0" >> "fiducial:0"] model "robot0" ) >> driver ( name "vfh" provides ["position2d:4"] requires >> ["position2d:0" "laser:0"] distance_epsilon "0.0625" >> angle_epsilon "360" ) >> >> from .cc: >> PlayerClient robot("localhost"); >> Position2dProxy pos(&robot, 0); >> LaserProxy lp(&robot, 0); >> FiducialProxy fp (&robot,0); >> >> bool look = true; >> player_fiducial_item beacon; //contains int32_t id, >> player_pose3d_t pose,player_pose3d_t upose >> >> while (look) { >> robot.Read(); >> beacon = fp.GetFiducialItem(0); >> printf("Current: (%g,%g)",pos.GetXPos(), >> pos.GetYPos()); >> printf("beacon.id = %d, beacon.x = %g, beacon.y = >> %g\n",beacon.id, beacon.pose.px, beacon.pose.py); >> >> >> } >> >> >> >> ------------------------------------------------------------------------------ >> Create and Deploy Rich Internet Apps outside the browser with >> Adobe(R)AIR(TM) >> software. With Adobe AIR, Ajax developers can use existing skills and code >> to >> build responsive, highly engaging applications that combine the power of >> local >> resources and data with the reach of the web. Download the Adobe AIR SDK >> and >> Ajax docs to start building applications today- >> http://p.sf.net/sfu/adobe-com >> _______________________________________________ >> Playerstage-users mailing list >> Pla...@li... >> https://lists.sourceforge.net/lists/listinfo/playerstage-users >> > > |