carla-simulator / ros-bridge

ROS bridge for CARLA Simulator
MIT License
523 stars 430 forks source link

colcon build error while installing carla-ros bridge for carla 9.14 and ROS2 #691

Closed AJK97 closed 1 year ago

AJK97 commented 1 year ago

hey community, I am a student and am trying to install carla ros bridge for the first time, but I keep encountering this error during the installation process. Anybody has experienced this before? Any help greatly appreciated!!! ROS2 Humble, Ubuntu 22.04, Carla 9.14

image

gezp commented 1 year ago

i fixed this problem by updating ros-bridge/pcl_recorder/CMakeLists.txt, you should add tf2_eigen to ament_target_dependencies().

raw: https://github.com/carla-simulator/ros-bridge/blob/e9063d97ff5a724f76adbb1b852dc71da1dcfeec/pcl_recorder/CMakeLists.txt#L68-L69

correct:

  ament_target_dependencies(${PROJECT_NAME}_node rclcpp sensor_msgs
                            pcl_conversions tf2 tf2_ros tf2_eigen)
AJK97 commented 1 year ago

hi, i tried it out and got this image

gezp commented 1 year ago

hi, i'm also adapting ros bridge of carla 0.9.14 for ROS humble on ubuntu22.04, you can try a fork of this repo carla_ros , which works well for me.

AJK97 commented 1 year ago

Hi, thanks for this! I will give it a try. one thing is that for me carla 9.14 is running in docker with ubuntu 20.04 and ROS2 humble is installed on the workstation that has ubuntu 22.04. So this should still be fine right?

And should I follow the README file instructions AFTER the ros carla bridge installation procedure as per the official documentation (https://carla.readthedocs.io/projects/ros-bridge/en/latest/ros_installation_ros2/ )? or INSTEAD?

Im quite an amateur so it would be helpful if you could provide some steps that should follow? Thankyou again for the help!!

gezp commented 1 year ago

one thing is that for me carla 9.14 is running in docker with ubuntu 20.04 and ROS2 humble is installed on the workstation that has ubuntu 22.04. So this should still be fine right?

i think it's ok, i do the same way.

Im quite an amateur so it would be helpful if you could provide some steps that should follow?

only need follow the README in carla_ros.

AJK97 commented 1 year ago

I tried it but I get some stderrors, do you have any idea where I went wrong? here is what i did:

  1. installed ROS2
  2. went to your git hub repo and downloaded the .whl file.
  3. ran the pip install for the whl command
  4. ran the remaining two steps

image

then

image

finally, output

image

Thanks!

gezp commented 1 year ago

you should clone github repo in src of ros workspace (for example ~/ros2_ws/src), and run rosdep install and colon build in ros workspace (for example ~/ros2_ws) @AJK97

AJK97 commented 1 year ago

HI, thanks for the explanation! I believe I got it built :) I got few warnings related to "SetuptoolsDeprecationWarning: setup.py install is deprecated " so i downgraded setuptools as per :https://answers.ros.org/question/396439/setuptoolsdeprecationwarning-setuppy-install-is-deprecated-use-build-and-pip-and-other-standards-based-tools/?answer=398274#post-id-398274.

Now finally to run the bridge, how is the process different form the official documentation since CARLA is running in a docker here?

gezp commented 1 year ago

Now finally to run the bridge, how is the process different form the official documentation since CARLA is running in a docker here?

yes, you can follow official documentation to launch carla ros bridge. by the way, you should add argument host with your carla server ip.

Autostone-c commented 1 year ago

Hi, thanks for this! I will give it a try. one thing is that for me carla 9.14 is running in docker with ubuntu 20.04 and ROS2 humble is installed on the workstation that has ubuntu 22.04. So this should still be fine right?

And should I follow the README file instructions AFTER the ros carla bridge installation procedure as per the official documentation (https://carla.readthedocs.io/projects/ros-bridge/en/latest/ros_installation_ros2/ )? or INSTEAD?

Im quite an amateur so it would be helpful if you could provide some steps that should follow? Thankyou again for the help!!

hi,I would also like to try this, but would it be convenient for you to share the build process?

AJK97 commented 1 year ago

Hi, just follow the read me file in the git repo mentioned above. Before that build a workspace first according to https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html in which you will clone and then build according to the above exchange.

AJK97 commented 1 year ago

@gezp Thanks once again for your help!!! I am closing this issue now :)