Q
Dependencies: SRF05 ros_lib_kinetic TinyGPSPlus
Diff: PROJ515.hpp
- Revision:
- 14:b972d0d0f63d
- Parent:
- 13:78b9acd2e873
--- a/PROJ515.hpp Sat May 11 17:52:33 2019 +0000 +++ b/PROJ515.hpp Tue May 14 15:34:59 2019 +0000 @@ -24,24 +24,28 @@ #define USP_CF4T PG_1 // Cliff ultrasound 4 Trigger #define USP_CF4E PB_11 // Cliff ultrasound 4 Echo -#define USP_CB1T PE_4 // Curb ultrasound 1 Trigger -#define USP_CB1E PG_9 // Curb ultrasound 1 Echo -#define USP_CB2T PE_2 // Curb ultrasound 2 Trigger -#define USP_CB2E PG_14 // Curb ultrasound 2 Echo +#define USP_CB1T PE_2 // Curb ultrasound 1 Trigger +#define USP_CB1E PG_14 // Curb ultrasound 1 Echo +#define USP_CB2T PE_4 // Curb ultrasound 2 Trigger +#define USP_CB2E PG_9 // Curb ultrasound 2 Echo #define USP_CB3T PE_6 // Curb ultrasound 3 Trigger #define USP_CB3E PE_7 // Curb ultrasound 3 Echo #define USP_CB4T PE_5 // Curb ultrasound 4 Trigger #define USP_CB4E PE_8 // Curb ultrasound 4 Echo +#define USP_CB5T PF_14 // Curb ultrasound 5 Trigger +#define USP_CB5E PE_11 // Curb ultrasound 5 Echo +#define USP_CB6T PE_9 // Curb ultrasound 6 Trigger +#define USP_CB6E PF_13 // Curb ultrasound 6 Echo #define GPS_TX PD_5 // GPS Transmit Pin #define GPS_RX PD_6 // GPS Recieve Pin #define FOV 1.396 // Ultrasound sensor field of view #define MIN_RANGE 0.025 // Ultrasound sensor min range -#define MAX_RANGE 2.2 // Ultrasound sensor max range -#define CLIFF_TRH 0.12 // Robot cliff treshold -#define CLIFF_ZRO 0 // Cliff not existent -#define EXCL_ZONE 0.15 // Robot footprint exclusion zone +#define MAX_RANGE 0.400 // Ultrasound sensor max range +#define CLIFF_TRH 0.120 // Robot cliff treshold +#define CLIFF_ZRO 0.000 // Cliff not existent +#define EXCL_ZONE 0.150 // Robot footprint exclusion zone #define ULTRASOUND 0x00 // Ultrasound #define UNAGUMENTED 0x00 // Unagumented @@ -75,6 +79,8 @@ extern float cbDist2; // Distance returned by curb u_sensor2 (m) extern float cbDist3; // Distance returned by curb u_sensor3 (m) extern float cbDist4; // Distance returned by curb u_sensor4 (m) +extern float cbDist5; // Distance returned by curb u_sensor5 (m) +extern float cbDist6; // Distance returned by curb u_sensor6 (m) extern float wPeriod; // Wait period(ms) for ROS publisher @@ -96,6 +102,8 @@ SRF05 USS_CB2(USP_CB2T, USP_CB2E); // Ultrasound sensor cliff 2 SRF05 USS_CB3(USP_CB3T, USP_CB3E); // Ultrasound sensor cliff 3 SRF05 USS_CB4(USP_CB4T, USP_CB4E); // Ultrasound sensor cliff 4 +SRF05 USS_CB5(USP_CB5T, USP_CB5E); // Ultrasound sensor cliff 5 +SRF05 USS_CB6(USP_CB6T, USP_CB6E); // Ultrasound sensor cliff 6 // Instance for GPS TinyGPSPlus gpsModule; // Instance of GPS class @@ -112,6 +120,8 @@ Range ultrasound_msg_cb2; // Instance for ROS Range message 6 Range ultrasound_msg_cb3; // Instance for ROS Range message 7 Range ultrasound_msg_cb4; // Instance for ROS Range message 8 +Range ultrasound_msg_cb5; // Instance for ROS Range message 9 +Range ultrasound_msg_cb6; // Instance for ROS Range message 10 NavSatFix gps_odom_msg; // Instance for ROS NavSatFix message @@ -124,6 +134,8 @@ Publisher ultrasound_pub_cb2("ultrasound/cb2", &ultrasound_msg_cb2); Publisher ultrasound_pub_cb3("ultrasound/cb3", &ultrasound_msg_cb3); Publisher ultrasound_pub_cb4("ultrasound/cb4", &ultrasound_msg_cb4); +Publisher ultrasound_pub_cb5("ultrasound/cb5", &ultrasound_msg_cb5); +Publisher ultrasound_pub_cb6("ultrasound/cb6", &ultrasound_msg_cb6); Publisher gps_odom_pub("gps_odom", &gps_odom_msg);