Category : ros

Trying to implement a simple ROS message in C++, outside of Catkin workspace, working in ubuntu, melodic, if any of that matters in this instance. ros::NodeHandle nh; ros::Publisher pose_pub = nh.advertise<geometry_msgs::PoseArray>("sample_path", 10000); geometry_msgs::PoseArray PoseArray; PoseArray.header.stamp = ros::Time::now(); You can assume I have all the proper includes. Now, after this… I can’t seem to access the ..

Read more

I have a really big code with this cmake that works: cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project(MYPROJECT) set (CMAKE_CXX_STANDARD 11) find_package(PCL 1.7 REQUIRED) if(DEFINED PCL_LIBRARIES) list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4") endif() FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED) include_directories(${PCL_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) add_executable (main src/main.cpp) target_link_libraries (main ${PCL_LIBRARIES}) Now, I want to publish the results of this code to a ros topic. ..

Read more

I am working on a project which should have to run on both ros melodic (ubuntu 18.04) and ros noetic(ubuntu 20.04). so while doing so I made an if-else statement in my code that, if(distro=="noetic"){ …do this else …do this The problem occurs basically, noetic and melodic support different versions of Point cloud Libraries(PCL) which ..

Read more