void topicCallback(const PointCloud::ConstPtr& pc_in) { if(pc_in->header.frame_id != target_frame_id_) { ROS_ERROR("Frame ID (%s) of incoming point cloud does not match target frame ID (%s), aborting...", pc_in->header.frame_id.c_str(), target_frame_id_.c_str()); return; } PointCloud::Ptr pc_out(new PointCloud); pcl::PointIndices::Ptr ind_out(new pcl::PointIndices); eppd_.setInputCloud(pc_in); eppd_.segment(*ind_out); ei_.setInputCloud(pc_in); ei_.setIndices(ind_out); ei_.filter(*pc_out); pc_pub_.publish(pc_out); }
//***************************************************************************** // // This example demonstrates how to send a string of data to the UART. // //***************************************************************************** int main(void) { delay_init(48); uart_config(); led_init(); #if 0 ind_cnn_init(); config conf; conf.local_ip[0]=192; conf.local_ip[1]=168; conf.local_ip[2]=1; conf.local_ip[3]=13; conf.local_port[0]=11; conf.local_port[1]=34; conf.sub_msk[0]=255; conf.sub_msk[1]=255; conf.sub_msk[2]=255; conf.sub_msk[3]=0; conf.gw[0]=192; conf.gw[1]=168; conf.gw[2]=1; conf.gw[3]=1; conf.mac[0]=0xe3; conf.mac[1]=0x90; conf.mac[2]=0x12; conf.mac[3]=0x2d; conf.mac[4]=0xef; conf.mac[5]=0x33; conf.remote_ip[0]=192; conf.remote_ip[1]=168; conf.remote_ip[2]=1; conf.remote_ip[3]=122; conf.remote_port[0]=0xef; conf.remote_port[1]=33; conf.protol=NET_PROTOL_TCP; conf.server_mode=CLIENT_MODE; conf.uart_baud=BAUD_115200; ind_out(1); delay(5); config_param(CONFIG_LOCAL_IP,&conf); config_param(CONFIG_LOCAL_PORT,&conf); config_param(CONFIG_GW,&conf); config_param(CONFIG_SUB_MSK,&conf); config_param(CONFIG_MAC,&conf); config_param(CONFIG_REMOTE_IP,&conf); config_param(CONFIG_REMOTE_PORT,&conf); config_param(CONFIG_PROTOL,&conf); config_param(CONFIG_SERVER_MODE,&conf); config_param(CONFIG_UART_BAUD,&conf); //read_param(); delay(5); ind_out(0); uart_send('A'); #endif GPIO_SetBits(GPIOF, GPIO_Pin_0); GPIO_SetBits(GPIOA, GPIO_Pin_4); delay_ms(100); GPIO_ResetBits(GPIOA, GPIO_Pin_4); delay_ms(100); GPIO_SetBits(GPIOA, GPIO_Pin_4); delay_ms(100); E2promWriteByte(0x40,0x04,0x8a); E2promWriteByte(0x40,0x04,0x01); // // Loop forever echoing data through the UART. // while(1) { rt_hw_led1_on(); //uart_send('A'); //ind_out(0); delay_ms(50); rt_hw_led1_off(); //uart_send('B'); //ind_out(1); delay_ms(50); } }