2323#include " verilated_vcd_c.h"
2424
2525
26- // ROS & opencv
27- #include < ros/ros.h>
28- #include < image_transport/image_transport.h>
29- #include < opencv2/highgui/highgui.hpp>
30- #include < cv_bridge/cv_bridge.h>
31-
32-
33-
3426#define LED_ICON " \uf111 "
3527#define START_ICON " \uf04b "
3628#define STOP_ICON " \uf04d "
@@ -242,24 +234,6 @@ bool update_texture(GLuint texture_id, GLenum format, const cv::Mat &texture) {
242234
243235cv::Mat input_feed;
244236
245- void imageCallback (const sensor_msgs::ImageConstPtr& msg)
246- {
247- try
248- {
249-
250- fprintf (stdout," callback :D\n " );
251-
252- input_feed = cv_bridge::toCvCopy (msg, " bgr8" )->image ;
253-
254- // cv::imshow("view", cv_bridge::toCvShare(msg, "bgr8")->image);
255- cv::waitKey (30 );
256- }
257- catch (cv_bridge::Exception& e)
258- {
259- ROS_ERROR (" Could not convert from '%s' to 'bgr8'." , msg->encoding .c_str ());
260- }
261- }
262-
263237
264238// Main code
265239int main (int argc, char **argv) {
@@ -334,9 +308,9 @@ int main(int argc, char **argv) {
334308 // init buffers
335309
336310 const cv::Mat input_image_1 = cv::imread (cv::String{input_image_1_path});
337- assert (input_image_1.channels () == 3 && input_image_1.cols == cols &&
311+ /* assert(input_image_1.channels() == 3 && input_image_1.cols == cols &&
338312 input_image_1.rows == rows && input_image_1.isContinuous());
339-
313+ */
340314 /* Enable WEBCAM Feed*/
341315
342316 cv::VideoCapture cap (0 );
@@ -383,15 +357,6 @@ int main(int argc, char **argv) {
383357 int cycles_per_iteration = 5 ;
384358
385359
386- // ROS Integration
387- /*
388- ros::init(argc, argv, "image_listener");
389- ros::NodeHandle nh;
390-
391- image_transport::ImageTransport it(nh);
392- image_transport::Subscriber sub = it.subscribe("image_raw", 1, imageCallback);
393- */
394-
395360
396361 // Main loop
397362 while (!done) {
@@ -414,9 +379,6 @@ int main(int argc, char **argv) {
414379 done = true ;
415380 }
416381
417- // ROS Callback handling attached to the main loop
418- // ros::spinOnce();
419-
420382 // Start the Dear ImGui frame
421383 ImGui_ImplOpenGL3_NewFrame ();
422384 ImGui_ImplSDL2_NewFrame ();
0 commit comments