ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

I am unable to colcon build the ros2 workspace and getting these errors. if somebody please help me with this....

asked 2023-01-18 04:07:06 -0600

Aisha gravatar image

updated 2023-01-19 01:39:43 -0600

billy gravatar image

In file included from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/solve_ik.h:7, from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/src/baxter_bridge.cpp:1: /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/ros1_msgs/baxter_core_msgs/SolvePositionIK.h:8:10: fatal error: ros/ros.h: No such file or directory 8 | #include <ros ros.h=""> | ^~~~~~~~~~~ compilation terminated. make[2]: * [CMakeFiles/baxter_bridge.dir/build.make:63: CMakeFiles/baxter_bridge.dir/src/baxter_bridge.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/src/monitor.cpp:1: /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/monitor.h:4:10: fatal error: ros/ros.h: No such file or directory 4 | #include <ros ros.h=""> | ^~~~~~~~~~~ compilation terminated. /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/src/bridge.cpp:1:10: fatal error: ros/ros.h: No such file or directory 1 | #include <ros ros.h=""> | ^~~~~~~~~~~ compilation terminated. In file included from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/bridge_1to2.h:4, from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/src/factory_1to2.cpp:2: /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/bridge.h:4:10: fatal error: ros/ros.h: No such file or directory 4 | #include <ros ros.h=""> | ^~~~~~~~~~~ compilation terminated. In file included from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/bridge_2to1.h:4, from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/src/factory_2to1.cpp:2: /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/bridge.h:4:10: fatal error: ros/ros.h: No such file or directory 4 | #include <ros ros.h=""> | ^~~~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/baxter_bridge.dir/build.make:89: CMakeFiles/baxter_bridge.dir/src/monitor.cpp.o] Error 1 make[2]: [CMakeFiles/baxter_bridge.dir/build.make:76: CMakeFiles/baxter_bridge.dir/src/bridge.cpp.o] Error 1 make[2]: [CMakeFiles/baxter_bridge.dir/build.make:115: CMakeFiles/baxter_bridge.dir/src/factory_1to2.cpp.o] Error 1 make[2]: [CMakeFiles/baxter_bridge.dir/build.make:128: CMakeFiles/baxter_bridge.dir/src/factory_2to1.cpp.o] Error 1 In file included from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/src/topic_poller.cpp:1: /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/topic_poller.h:6:10: fatal error: ros/ros.h: No such file or directory 6 | #include <ros ros.h=""> | ^~~~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/baxter_bridge.dir/build.make:141: CMakeFiles/baxter_bridge.dir/src/topic_poller.cpp.o] Error 1 In file included from /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/src/factory.cpp:2: /home/aisha/ros2_ws/src/baxter_common_ros2/baxter_bridge/include/baxter_bridge/bridge.h:4:10: fatal error: ros/ros.h: No such file or directory 4 | #include <ros ros.h=""> | ^~~~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/baxter_bridge.dir/build.make:102: CMakeFiles/baxter_bridge.dir/src/factory.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:78: CMakeFiles/baxter_bridge.dir/all] Error 2 make: * [Makefile:141: all] Error 2 --- Failed <<< baxter_bridge [0.28s, exited with code 2]

Summary: 6 packages finished [2.09s]
  1 package failed: baxter_bridge
  1 package had stderr output: baxter_bridge
edit retag flag offensive close merge delete

Comments

1

Does your machine have ROS installed, or only ROS2? Have you read the instructions for using that package?

billy gravatar image billy  ( 2023-01-19 01:46:00 -0600 )edit

ROS2 does not use #include <ros ros.h> your code is probabbly only ROS1 compatible

GeorgNo gravatar image GeorgNo  ( 2023-01-19 05:36:58 -0600 )edit

how should I edit this now?

Aisha gravatar image Aisha  ( 2023-01-26 23:14:10 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-01-23 06:31:20 -0600

AibohphobiA gravatar image

as GeorgNo mentioned above, your src file baxter_bridge.cpp is trying to include ros.h which is no longer relevant in ROS2.

edit flag offensive delete link more

Comments

so what should I do now?

Aisha gravatar image Aisha  ( 2023-01-26 23:13:14 -0600 )edit

Port it to ROS2 if you inted to use ROS2: http://docs.ros.org/en/humble/p/rclcpp/

GeorgNo gravatar image GeorgNo  ( 2023-01-29 13:26:08 -0600 )edit

I am not familiar with Baxter, but seems like it was intended for ROS1. I would try to install ROS1 (probably Noetic), set up the environment and build it with catkin. see: build a package on ros1

AibohphobiA gravatar image AibohphobiA  ( 2023-01-30 02:33:27 -0600 )edit

Question Tools

Stats

Asked: 2023-01-18 04:07:06 -0600

Seen: 517 times

Last updated: Jan 23 '23