leggedrobotics / xpp

Visualization of Motions for Legged Robots in ros-rviz
http://wiki.ros.org/xpp
BSD 3-Clause "New" or "Revised" License
317 stars 99 forks source link

Invoking "make -j4 -l4" failed: Error when catkin_make on git clone #19

Closed fus3 closed 3 years ago

fus3 commented 3 years ago

I have installed ros noetic on ubuntu 20.04 on Vmware workstation 16 pro, everything works find but when i tried to get xpp trought ROS Binaries i couldn't find the package because when i type: sudo apt-get install ros-noetic-xpp or sudo apt install ros-noetic-xpp thats the output:

sudo apt-get install ros-noetic-xpp

Reading package lists... Done Building dependency tree
Reading state information... Done W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target Translations (main/i18n/Translation-es) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target DEP-11-icons-hidpi (main/dep11/icons-64x64@2.tar) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/ros-focal.list:1 and /etc/apt/sources.list.d/ros-latest.list:1 E: Unable to locate package ros-noetic-xpp

Also, thats the output of apt info ros-noetic:

XmlRpc++ is a C++ implementation of the XML-RPC protocol.

ros-noetic-xmlrpcpp-dbgsym/focal 1.15.9-1focal.20201016.232921 amd64 debug symbols for ros-noetic-xmlrpcpp

ros-noetic-xpp-msgs/focal 1.0.10-1focal.20210112.080209 amd64 ROS messages used in the XPP framework.

ros-noetic-xpp-states/focal 1.0.10-1focal.20201014.204904 amd64 Common definitions (positions, velocities, angular angles, angular rates) and robot definitions in Cartesian and joint state used in the Xpp Motion Framework, as well as conversions to/from xpp_msgs.

ros-noetic-xpp-states-dbgsym/focal 1.0.10-1focal.20201014.204904 amd64 debug symbols for ros-noetic-xpp-states

ros-noetic-xv-11-laser-driver/focal 0.3.0-1focal.20210112.082147 amd64 Neato XV-11 Laser Driver.

ros-noetic-xv-11-laser-driver-dbgsym/focal 0.3.0-1focal.20210112.082147 amd64 debug symbols for ros-noetic-xv-11-laser-driver

ros-noetic-ypspur/focal 1.20.1-1focal.20210310.141638 amd64 YP-Spur is a mobile robot motion control software with coordinate frame based commands.

ros-noetic-ypspur-dbgsym/focal 1.20.1-1focal.20210310.141638 amd64 debug symbols for ros-noetic-ypspur

So because i couldn't install the package trought apt i did a git clone of the repo, but when i run catkin_make i get this error:

[ 76%] Building CXX object xpp/xpp_vis/CMakeFiles/xpp_vis.dir/src/urdf_visualizer.cc.o [ 76%] Building CXX object xpp/xpp_vis/CMakeFiles/xpp_vis.dir/src/cartesian_joint_converter.cc.o [ 76%] Building CXX object xpp/xpp_vis/CMakeFiles/xpp_vis.dir/src/rviz_robot_builder.cc.o /home/ros/catkin_ws/src/xpp/xpp_vis/src/urdf_visualizer.cc: In member function ‘void xpp::UrdfVisualizer::StateCallback(const RobotStateJoint&)’: /home/ros/catkin_ws/src/xpp/xpp_vis/src/urdf_visualizer.cc:73:85: error: no matching function for call to ‘robot_state_publisher::RobotStatePublisher::publishTransforms(std::map<std::__cxx11::basic_string, double>&, ros::Time, std::string&)’ 73 robot_publisher->publishTransforms(joint_positions, ::ros::Time::now(), tfprefix); ^ In file included from /home/ros/catkin_ws/src/xpp/xpp_vis/include/xpp_vis/urdf_visualizer.h:45, from /home/ros/catkin_ws/src/xpp/xpp_vis/src/urdf_visualizer.cc:30: /opt/ros/noetic/include/robot_state_publisher/robot_state_publisher.h:83:16: note: candidate: ‘virtual void robot_state_publisher::RobotStatePublisher::publishTransforms(const std::map<std::__cxx11::basic_string, double>&, const ros::Time&)’ 83 virtual void publishTransforms(const std::map<std::string, double>& joint_positions, const ros::Time& time); ^~~~~ /opt/ros/noetic/include/robot_state_publisher/robot_state_publisher.h:83:16: note: candidate expects 2 arguments, 3 provided /home/ros/catkin_ws/src/xpp/xpp_vis/src/urdf_visualizer.cc:74:43: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string’} to ‘bool’ 74 robot_publisher->publishFixedTransforms(tfprefix); ^~~~~~
std::string {aka std::__cxx11::basic_string}

In file included from /home/ros/catkin_ws/src/xpp/xpp_vis/include/xpp_vis/urdf_visualizer.h:45, from /home/ros/catkin_ws/src/xpp/xpp_vis/src/urdf_visualizer.cc:30: /opt/ros/noetic/include/robot_state_publisher/robot_state_publisher.h:84:44: note: initializing argument 1 of ‘virtual void robot_state_publisher::RobotStatePublisher::publishFixedTransforms(bool)’ 84 | virtual void publishFixedTransforms(bool use_tf_static = false); | ~^~~~~ make[2]: [xpp/xpp_vis/CMakeFiles/xpp_vis.dir/build.make:63: xpp/xpp_vis/CMakeFiles/xpp_vis.dir/src/urdf_visualizer.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:1782: xpp/xpp_vis/CMakeFiles/xpp_vis.dir/all] Error 2 make: [Makefile:141: all] Error 2 Invoking "make -j4 -l4" failed

So im wondering if its a personal problem or a problem from the repo

fus3 commented 3 years ago

Ok, solved. Just add this changes on the next files: https://github.com/ros/robot_state_publisher/pull/139/files/c4f41fb3f9280beab67853d1c8541e75417ca57d