23 #define NUM_ACTIVE_SECTORS (3) 28 int main (
int argc,
char *argv[]) {
34 if(argc > 2 || (argc == 2 && strcasecmp(argv[1],
"--help") == 0)) {
35 cerr <<
"Usage: ld_multi_sector [SICK IP ADDRESS]" << endl
36 <<
"Ex. ld_multi_sector 192.168.1.11" << endl;
42 sick_ip_addr = argv[1];
53 double range_values[SickLD::SICK_MAX_NUM_MEASUREMENTS] = {0};
54 unsigned int reflect_values[SickLD::SICK_MAX_NUM_MEASUREMENTS] = {0};
70 cerr <<
"Initialize failed! Are you using the correct IP address?" << endl;
83 for (
unsigned int i = 0; i < 10; i++) {
86 sick_ld.
GetSickMeasurements(range_values,reflect_values,num_values,sector_ids,data_offsets);
91 cout <<
"\t[Sector ID: " << sector_ids[i]
92 <<
", Num Meas: " << num_values[i]
93 <<
", 1st Range Val: " << range_values[data_offsets[i]]
94 <<
", 1st Reflect Val: " << reflect_values[data_offsets[i]]
106 cerr <<
"An error occurred!" << endl;
117 cerr <<
"Uninitialize failed!" << endl;
#define DEFAULT_SICK_IP_ADDRESS
Default Sick LD INet 4 address.
#define NUM_ACTIVE_SECTORS
Defines the SickLD class for working with the Sick LD-OEM/LD-LRS long range LIDARs.
int main(int argc, char *argv[])