bchretien / arch-ros-stacks

:package: AUR packages of ROS stacks.
46 stars 26 forks source link

Build error ros-kinetic-gazebo-ros-control #64

Closed teasp00n closed 7 years ago

teasp00n commented 7 years ago

Not sure if this is the correct place to ask for help with this but I'm trying to install ros-kinetic-gazebo-ros-control from the AUR and I'm getting the following compiler errors:

/tmp/yaourt-tmp-troy/aur-ros-kinetic-gazebo-ros-control/src/gazebo_ros_pkgs-release-release-kinetic-gazebo_ros_control-2.5.8-0/src/default_robot_hw_sim.cpp: In member function 'void gazebo_ros_control::DefaultRobotHWSim::registerJointLimits(const string&, const hardware_interface::JointHandle&, gazebo_ros_control::DefaultRobotHWSim::ControlMethod, const ros::NodeHandle&, const urdf::Model*, int*, double*, double*, double*)':
/tmp/yaourt-tmp-troy/aur-ros-kinetic-gazebo-ros-control/src/gazebo_ros_pkgs-release-release-kinetic-gazebo_ros_control-2.5.8-0/src/default_robot_hw_sim.cpp:384:81: error: conversion from 'urdf::JointConstSharedPtr {aka std::shared_ptr<const urdf::Joint>}' to non-scalar type 'const boost::shared_ptr<const urdf::Joint>' requested
     const boost::shared_ptr<const urdf::Joint> urdf_joint = urdf_model->getJoint(joint_name);
                                                             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/tmp/yaourt-tmp-troy/aur-ros-kinetic-gazebo-ros-control/src/gazebo_ros_pkgs-release-release-kinetic-gazebo_ros_control-2.5.8-0/src/default_robot_hw_sim.cpp:389:68: error: no matching function for call to 'getJointLimits(const boost::shared_ptr<const urdf::Joint>&, joint_limits_interface::JointLimits&)'
       if (joint_limits_interface::getJointLimits(urdf_joint, limits))

and

/opt/ros/kinetic/include/joint_limits_interface/joint_limits_urdf.h:48:13: note:   no known conversion for argument 1 from 'const boost::shared_ptr<const urdf::Joint>' to 'urdf::JointConstSharedPtr {aka std::shared_ptr<const urdf::Joint>}'
/tmp/yaourt-tmp-troy/aur-ros-kinetic-gazebo-ros-control/src/gazebo_ros_pkgs-release-release-kinetic-gazebo_ros_control-2.5.8-0/src/default_robot_hw_sim.cpp:391:77: error: could not convert 'urdf_joint' from 'const boost::shared_ptr<const urdf::Joint>' to 'urdf::JointConstSharedPtr {aka std::shared_ptr<const urdf::Joint>}'
       if (joint_limits_interface::getSoftJointLimits(urdf_joint, soft_limits))

I installed ros-kintetic-desktop-full fine (using gazebo-ogre-1.10 and qtwebkit-bin).

Any help resolving this would be greatly appreciated.

zootboy commented 7 years ago

This might just be an out of date issue, I see some commits that look like they might fix this (e.g. https://github.com/ros-controls/ros_control/pull/251/files ). I'm testing an update to the ros-kinetic-gazebo* tree, once it finishes building I'll push it to the AUR. Fingers crossed that it'll fix this, otherwise it may require some patching.

teasp00n commented 7 years ago

Awesome! Thanks for looking into this 👍

zootboy commented 7 years ago

Notes so far:

I've pushed a bunch of updated packages to the AUR. I'd suggest first making sure all your existing packages are updated ("cower -u" for a list), rebuilding anything with missing .so links (https://seangreenslade.com/h/snippets/ros-find-outofdate.py), then try building ros-kinetic-gazebo-ros-control again. It built on my machine, so there's hope.

teasp00n commented 7 years ago

Thanks for this. Installing the updated packages now. Fingers crossed it'll work :)

teasp00n commented 7 years ago

I'm doing a complete clean reinstall so I removed all ros-kinetic-* packages and then issued a pacaur -S ros-kinetic-desktop-full

I get the following error when building ros-kinetic-roscpp

/home/troy/.cache/pacaur/ros-kinetic-roscpp/src/ros_comm-release-release-kinetic-roscpp-1.12.7-0/src/libros/transport/transport_udp.cpp: In member function 'virtual int32_t ros::TransportUDP::read(uint8_t*, uint32_t)':
/home/troy/.cache/pacaur/ros-kinetic-roscpp/src/ros_comm-release-release-kinetic-roscpp-1.12.7-0/src/libros/transport/transport_udp.cpp:407:21: error: 'readv' was not declared in this scope
         num_bytes = readv(sock_, iov, 2);
                     ^~~~~
/home/troy/.cache/pacaur/ros-kinetic-roscpp/src/ros_comm-release-release-kinetic-roscpp-1.12.7-0/src/libros/transport/transport_udp.cpp:407:21: note: suggested alternative: 'read'
         num_bytes = readv(sock_, iov, 2);
                     ^~~~~
                     read
/home/troy/.cache/pacaur/ros-kinetic-roscpp/src/ros_comm-release-release-kinetic-roscpp-1.12.7-0/src/libros/transport/transport_udp.cpp: In member function 'virtual int32_t ros::TransportUDP::write(uint8_t*, uint32_t)':
/home/troy/.cache/pacaur/ros-kinetic-roscpp/src/ros_comm-release-release-kinetic-roscpp-1.12.7-0/src/libros/transport/transport_udp.cpp:579:25: error: 'writev' was not declared in this scope
     ssize_t num_bytes = writev(sock_, iov, 2);
                         ^~~~~~
/home/troy/.cache/pacaur/ros-kinetic-roscpp/src/ros_comm-release-release-kinetic-roscpp-1.12.7-0/src/libros/transport/transport_udp.cpp:579:25: note: suggested alternative: 'write'
     ssize_t num_bytes = writev(sock_, iov, 2);
                         ^~~~~~
                         write

Is this just a case of another outdated package?

zootboy commented 7 years ago

Seems like it's this issue:

https://github.com/ros/ros_comm/pull/1105

which they fixed for lunar, but not kinetic. I added a quick patch to the AUR package, and when I get the time I'll submit a PR to upstream it.

teasp00n commented 7 years ago

It's working now.

Also ros-kinetic-collada-urdf requires community/uriparser

[ 50%] Linking CXX executable devel/lib/collada_urdf/collada_to_urdf
/usr/bin/ld: warning: liburiparser.so.1, needed by /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/libcollada-dom2.4-dp.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/libcollada-dom2.4-dp.so: undefined reference to `uriFreeUriMembersA'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/libcollada-dom2.4-dp.so: undefined reference to `uriParseUriA'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/collada_to_urdf.dir/build.make:150: devel/lib/collada_urdf/collada_to_urdf] Error 1
make[1]: *** [CMakeFiles/Makefile2:1712: CMakeFiles/collada_to_urdf.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 66%] Linking CXX shared library devel/lib/libcollada_urdf.so
[ 66%] Built target collada_urdf
make: *** [Makefile:130: all] Error 2
==> ERROR: A failure occurred in build().

Installing uriparser fixes that issue.

Thanks again for your help.

zootboy commented 7 years ago

Updated that pkg & included the dep. It should probably be pulled in by something else given that it's not in the rosdep list, but I don't have the energy to track it down. A bunch of the Arch rosdep names seem to have been reverted recently, so that'll be my next priority.

Feel free to close the issue if everything is working for you, and comment on / flag AUR packages if you run into more build issues with them.

teasp00n commented 7 years ago

This issue is resolved so I'll close it. I'm actually trying to get the simple-arm project up and running completely on kinetic and it looks like I need the kinetic version of aur/ros-indigo-effort-controllers. Shall I raise a separate issue for this?

zootboy commented 7 years ago

Just shoot me an email with a list of packages you need. I'll make sure they build at the very least.