49 if ((
cliff_enable_ && (msg->leftcliff & roch_msgs::SensorState::CLIFF )) ||
50 (
ult_enable_ && (msg->leftult & roch_msgs::SensorState::NEAR)) ||
51 (
psd_enable_ && (msg->leftpsd & roch_msgs::SensorState::NEAR)))
63 if ((
ult_enable_ && (msg->centerult & roch_msgs::SensorState::NEAR )) ||
64 (
psd_enable_ && (msg->centerpsd & roch_msgs::SensorState::NEAR)))
75 if ((
cliff_enable_ && (msg->rightcliff & roch_msgs::SensorState::CLIFF)) ||
76 (
ult_enable_ && (msg->rightult & roch_msgs::SensorState::NEAR )) ||
77 (
psd_enable_ && (msg->rightpsd & roch_msgs::SensorState::NEAR)))
101 std::string base_link_frame;
103 bool ult_en,psd_en,cliff_en;
107 private_nh_.
param<std::string>(
"base_link_frame", base_link_frame,
"/base_link");
130 for (
size_t d = 0;
d <
pointcloud_.fields.size(); ++
d, offset += 4)
134 pointcloud_.fields[
d].datatype = sensor_msgs::PointField::FLOAT32;
156 ROS_INFO(
"init params: cliff_enable:%d ult_enable:%d psd_enable:%d.",cliff_enable_, ult_enable_, psd_enable_);
163 int main(
int argc,
char** argv){
164 ros::init(argc,argv,
"roch_sensorpc_nodelet");
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Bumper/cliff to pointcloud nodelet class declaration.
ros::NodeHandle private_nh_
int main(int argc, char **argv)
ROSCPP_DECL void spin(Spinner &spinner)
ros::Subscriber core_sensor_sub_
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
ros::Publisher pointcloud_pub_
sensor_msgs::PointCloud2 pointcloud_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void coreSensorCB(const roch_msgs::SensorState::ConstPtr &msg)
Core sensors state structure callback.
uint32_t getNumSubscribers() const
#define ROS_INFO_STREAM(args)
SensorPcNodelet class declaration.