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

follow_joint_trajectory.hpp: No such file or directory #1

Closed
fujitatomoya opened this issue May 22, 2019 · 5 comments
Closed

follow_joint_trajectory.hpp: No such file or directory #1

fujitatomoya opened this issue May 22, 2019 · 5 comments

Comments

@fujitatomoya
Copy link

i was trying to give it a shot, but facing build problem here,
using docker image ubuntu16.04 / ROS melodic&crystal.

--- stderr: action_bridge
/root/ros2_intro_colcon/src/action_bridge/src/action_bridge_follow_joint_trajectory.cpp:28:10: fatal error: control_msgs/action/follow_joint_trajectory.hpp: No such file or directory
 #include "control_msgs/action/follow_joint_trajectory.hpp"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/action_bridge_follow_joint_trajectory_node.dir/src/action_bridge_follow_joint_trajectory.cpp.o] Error 1
make[1]: *** [CMakeFiles/action_bridge_follow_joint_trajectory_node.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< action_bridge      [ Exited with code 2 ]

confirmed control-msgs packages are installed on host for melodic and crystal.

~/ros2_intro_colcon# dpkg -l | grep control_msgs
ii  ros-crystal-control-msgs                           2.1.0-0bionic.20190402.205335        amd64        control_msgs contains base messages and actions useful for controlling robots.
ii  ros-melodic-control-msgs                           1.5.0-0bionic.20190319.071503        amd64        control_msgs contains base messages and actions useful for controlling robots.

@hsd-dev
Copy link
Owner

hsd-dev commented May 22, 2019

You will have to clone control_msgs in your ROS2 workspace as mentioned in the README. There is a dependency missing in the binaries.

@fujitatomoya
Copy link
Author

still having the same problem,

root@5aa526d14948:~/ros2_intro_colcon# cd src/control_msgs/
root@5aa526d14948:~/ros2_intro_colcon/src/control_msgs# git branch
* crystal-devel
root@5aa526d14948:~/ros2_intro_colcon/src/control_msgs# cd -
/root/ros2_intro_colcon
root@5aa526d14948:~/ros2_intro_colcon# colcon build
...<snip>
--- stderr: action_bridge
/root/ros2_intro_colcon/src/action_bridge/src/action_bridge_follow_joint_trajectory.cpp:28:10: fatal error: control_msgs/action/follow_joint_trajectory.hpp: No such file or directory
 #include "control_msgs/action/follow_joint_trajectory.hpp"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/action_bridge_follow_joint_trajectory_node.dir/src/action_bridge_follow_joint_trajectory.cpp.o] Error 1
make[1]: *** [CMakeFiles/action_bridge_follow_joint_trajectory_node.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< action_bridge      [ Exited with code 2 ]

actually follow_joint_trajectory.hpp is successfully compiled as followings,

root@5aa526d14948:~/ros2_intro_colcon# find . -type f -name follow_joint_trajectory.hpp
./install/control_msgs/include/control_msgs/action/follow_joint_trajectory.hpp
./build/control_msgs/rosidl_generator_cpp/control_msgs/action/follow_joint_trajectory.hpp

not sure if this is cz of my environment or not.

@hsd-dev
Copy link
Owner

hsd-dev commented May 22, 2019

You can use this Dockerfile to build the package:

from osrf/ros:crystal-ros1-bridge

RUN apt-get update && apt-get install --no-install-recommends -y \
    git \
    python3-colcon-common-extensions 

RUN apt-get install -y ros-melodic-actionlib \
                       ros-melodic-actionlib-tutorials \
                       ros-melodic-control-msgs \
                       ros-melodic-roscpp \
                       ros-crystal-control-msgs \
                       ros-crystal-example-interfaces \
                       ros-crystal-rclcpp \
                       ros-crystal-rclcpp-action \
                       && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /bridge_ws/src/ && cd /bridge_ws/src/ \
    && git clone https://github.com/ipa-hsd/action_bridge.git \
    && git clone -b crystal-devel https://github.com/ros-controls/control_msgs.git \
    && cd /bridge_ws \ 
    && . /opt/ros/melodic/setup.sh \
    && . /opt/ros/crystal/setup.sh \
    && colcon build

@hsd-dev
Copy link
Owner

hsd-dev commented May 23, 2019

I will close this for now. If you still face any issues, you can reopen it.

@hsd-dev hsd-dev closed this as completed May 23, 2019
@fujitatomoya
Copy link
Author

confirmed it works, just in case.

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

2 participants