8 CPPUNIT_ASSERT( playerc_sonar_subscribe(
sonarProxy, PLAYER_OPEN_MODE ) == 0 );
13 CPPUNIT_ASSERT( playerc_sonar_unsubscribe(
sonarProxy ) == 0 );
19 CPPUNIT_ASSERT( playerc_sonar_get_geom(
sonarProxy ) == 0 );
22 CPPUNIT_ASSERT(
sonarProxy->pose_count == 16 );
23 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
"pose[0] (x)", 0.075,
sonarProxy->poses[0].px,
Delta );
24 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
"pose[0] (y)", 0.130,
sonarProxy->poses[0].py,
Delta );
25 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
"pose[0] (z)", 0,
sonarProxy->poses[0].pz,
Delta );
26 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
"pose[0] (angle)", M_PI/2,
sonarProxy->poses[0].pyaw,
Delta );
30 playerc_client_read(
client );
34 playerc_client_read(
client );
35 CPPUNIT_ASSERT_MESSAGE(
"sonar updating",
sonarProxy->info.fresh == 1 );
37 CPPUNIT_ASSERT(
sonarProxy->info.datatime > 0 );
38 CPPUNIT_ASSERT(
sonarProxy->scan_count == 16 );
41 for (
int i = 0; i <
sonarProxy->scan_count; i++ ) {
static const double Delta
playerc_client_t * client
playerc_sonar_t * sonarProxy