This page explaines how to use the library samples provided.
Aboud sample program
urg_library are available with some samples.
Please change the codes of the following open_urg_sensor.c for your sensor settings.
- open_urg_sensor.c
int open_urg_sensor(
urg_t *urg,
int argc,
char *argv[])
{
#if defined(URG_WINDOWS_OS)
const char *device = "COM4";
#elif defined(URG_LINUX_OS)
const char *device = "/dev/ttyACM0";
#else
const char *device = "/dev/tty.usbmodemfa131";
#endif
long baudrate_or_port = 115200;
const char *ip_address = "192.168.0.10";
In addition, these samples can be connected by Ethernet if you specify "-e" by command line args. (For example: "> get_distance.exe -e")