Dirt detect sensor
SKT-Peanut opened this issue · 0 comments
I am using an iRobot Create 2 and am trying to get dirt detect data through a publisher but I don't know if this is right.
-
create_driver.h:
adding in:
std_msgs::UInt16 dirt_msg_; //dirt
void publishDirtInfo() const; //dirt
ros::Publisher dirt_detect_pub_; //dirt -
create_driver.cpp:
adding in
dirt_detect_pub_ = nh.advertise<std_msgs::UInt16>("dirt_detect", 10);
publishDirtInfo() //i add that in update()
So I read that the dirt sensor is a "piezoelectric sensor (essentially a crystal that generates electrical impulses when things strike it). When bits of dirt hit the sensor, they generate tiny electric impulses and, presumably, an excessive number of these impulses triggers 'dirt detect'." The problem is when I echo the dirt_detect topic, it only gives me val