PlotJuggler / plotjuggler-ros-plugins

Many PlotJuggler plugins for ROS and ROS2.
GNU Affero General Public License v3.0
106 stars 44 forks source link

Failed to compile using catkin build #69

Closed nimesh00 closed 1 year ago

nimesh00 commented 1 year ago

I have installed in my system and it is working fine. I was trying to install ROS plugins through source, but during the build of plotjuggler_ros package I get the following error(s). Can someone point out what I am doing wrong and/or what can be possible solution of this. I am using ROS Noetic on mac m1 installed through conda (robostack).

/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:84: error: no member named 'ptr_fun' in namespace 'std' line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));


/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:95: error: expected '(' for function-style cast or type construction
    line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
                                                                                           ~~~^
/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:100: error: expected '(' for function-style cast or type construction
    line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));

Thanks in advance!
nimesh00 commented 1 year ago

Fixed it by replacing line 62: line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace)))); with line.erase(line.begin(), std::find_if(line.begin(), line.end(), [](unsigned char c){return !std::isspace(c);}));