Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build on ros noetic on ubuntu 2004 #20

Open
cyoahs opened this issue Apr 23, 2021 · 4 comments
Open

Failed to build on ros noetic on ubuntu 2004 #20

cyoahs opened this issue Apr 23, 2021 · 4 comments

Comments

@cyoahs
Copy link

cyoahs commented Apr 23, 2021

Hello,

I tried to install this package on ubuntu 2004. I tried package management tools, but apt only contains ros-noetic-xpp-msgs, ros-noetic-xpp-states and ros-noetic-xpp-states-dbgsym. When I try to build from source, error occured as

Errors     << xpp_vis:make /home/ycshao/repo/catkin_workspace/logs/xpp_vis/build.make.003.log
/home/ycshao/repo/catkin_workspace/src/xpp/xpp_vis/src/urdf_visualizer.cc: In member function ‘void xpp::UrdfVisualizer::StateCallback(const RobotStateJoint&)’:
/home/ycshao/repo/catkin_workspace/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<char>, double>&, ros::Time, std::string&)’
   73 |   robot_publisher->publishTransforms(joint_positions, ::ros::Time::now(), tf_prefix_);
      |                                                                                     ^
In file included from /home/ycshao/repo/catkin_workspace/src/xpp/xpp_vis/include/xpp_vis/urdf_visualizer.h:45,
                 from /home/ycshao/repo/catkin_workspace/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<char>, 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/ycshao/repo/catkin_workspace/src/xpp/xpp_vis/src/urdf_visualizer.cc:74:43: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘bool’
   74 |   robot_publisher->publishFixedTransforms(tf_prefix_);
      |                                           ^~~~~~~~~~
      |                                           |
      |                                           std::string {aka std::__cxx11::basic_string<char>}
In file included from /home/ycshao/repo/catkin_workspace/src/xpp/xpp_vis/include/xpp_vis/urdf_visualizer.h:45,
                 from /home/ycshao/repo/catkin_workspace/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]: *** [CMakeFiles/xpp_vis.dir/build.make:63: CMakeFiles/xpp_vis.dir/src/urdf_visualizer.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:586: CMakeFiles/xpp_vis.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

It seems in ros noetic, robot_publisher->publishFixedTransforms and robot_publisher->publishTransforms have different defination with previous ros distro. I finally fixed this problem by simply changing those two lines mentioned in the error messages. But this change breaks the TF relationship and results in incorrect display in rviz for links.

@thvhauwe
Copy link

thvhauwe commented May 6, 2021

see my pull request #21 for a possible fix...

@Veverest
Copy link

Veverest commented May 27, 2021

Hi, I have run into the same issue. Did you find a workaround until the bug is fixed?

@cyoahs
Copy link
Author

cyoahs commented May 27, 2021

Hi, I have run into the same issue. Did you find a workaround until the bug is fixed?

For me, I simpily remove those arguments. As a result, the robot can not be visualized correctly but we can still see the correct base and end effector motion. Maybe you can try @thvhauwe 's solution. @Veverest

@CharlyMae
Copy link

Hey I had the same Problem. Thanks for the "fix" now at least its installed and semi-running. If anyone has updates, they are much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants