12.06.2013 Views

"Applicazione di un laser range scanner a un robot mobile", 2010

"Applicazione di un laser range scanner a un robot mobile", 2010

"Applicazione di un laser range scanner a un robot mobile", 2010

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ArLog::init(ArLog::StdErr, ArLog::Normal);<br />

// connector nuovo al posto del simple<br />

ArRobotConnector <strong>robot</strong>Connector(&parser, &tobor);<br />

printf("This program will make the <strong>robot</strong> wander aro<strong>un</strong>d, avoi<strong>di</strong>ng obstacles, and print some data and<br />

events.\nPress Ctrl-C to exit.\n");<br />

ArLaserConnector <strong>laser</strong>Connector(&parser, &tobor, &<strong>robot</strong>Connector); // new<br />

// add the <strong>range</strong> devices to the <strong>robot</strong><br />

tobor.addRangeDevice(&sonar);<br />

tobor.addRangeDevice(&bumpers);<br />

tobor.addRangeDevice(&ir);<br />

ArGripper pinza=ArGripper(&tobor);<br />

//metodo nuovo <strong>di</strong> tentativo <strong>di</strong> connessione<br />

if (!<strong>robot</strong>Connector.connectRobot())<br />

{<br />

// Error connecting:<br />

// if the user gave the -help argumentp, then just print out what happened,<br />

// and continue so options can be <strong>di</strong>splayed later.<br />

if (!parser.checkHelpAndWarnUnparsed())<br />

56

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!