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

Can't use geometry_msgs on a Raspberry Pi 4

asked 2021-02-07 23:13:29 -0500

RobotHunter gravatar image

Sorry if this is a simple question, I'm not too experienced with ROS. I downloaded ROS Noetic onto a Raspberry Pi 4 Model B, and I'm trying to use the Bradanlane ros-i2cpwmboard controller. However, whenever I try to to run catkin_make, I get an error that says "fatal error: geometry_msgs/Twist.h: No such file or directory"

I tried going into the ros-12cpwmboard package's CMakeLists, and add geometry_msgs to find_packages and catkin_package (for reference, it ended up like:

find_package(catkin REQUIRED COMPONENTS roscpp std_msgs message_generation geometry_msgs)
...
catkin_package(CATKIN_DEPENDS roscpp std_msgs message_runtime geometry_msgs)

) And then in the package.xml file, I add geometry_msgs to the necessary dependencies (<build_depend>geometry_msgs</build_depend> and <run_depend>geometry_msgs</run_depend>)

When I do this and then try catkin_make again, I instead get this error: 'Could not find a package configuration file provided by "geometry_msgs" with any of the following names "geometry_msgsConfig.cmake" "geometry_msgs-config.cmake"'

I'm using the SunFounder PiCar-V robot car, which can be found here: https://www.sunfounder.com/products/s... Does anyone know what could be the problem? I followed a tutorial on how to download ROS Noetic onto a Raspberry Pi and I was also following a tutorial online on using these packages. Thanks for any help.

edit retag flag offensive close merge delete

Comments

What's the output of rospack find geometry_msgs? Also check out this similar question

abhishek47 gravatar image abhishek47  ( 2021-02-08 09:33:39 -0500 )edit

Doing this in the catkin_ws gives [rospack] Error: package 'geometry_msgs' not found

RobotHunter gravatar image RobotHunter  ( 2021-02-08 09:45:52 -0500 )edit

Here are the tutorials I used: Installing ROS Noetic on a Raspberry Pi 4: https://varhowto.com/install-ros-noet... Installing additional packages for i2cpwm control and getting the robot car to move: https://www.youtube.com/watch?v=iLiI_...

RobotHunter gravatar image RobotHunter  ( 2021-02-08 09:48:58 -0500 )edit

Since your problem doesn't have anything to do with Raspberry Pi, may be you should consider updating your title

abhishek47 gravatar image abhishek47  ( 2021-02-09 03:33:32 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-02-09 12:37:02 -0500

RobotHunter gravatar image

Thanks for your help, I was able to figure it out, I needed to download common_msgs from Github. However, this has led to another error with the i2cpwm controller. If anyone wants to look into that, I posted about that here. I'll try the solution that ingtux gave me regardless to see if that can fix this new issue.

edit flag offensive delete link more
0

answered 2021-02-09 02:56:47 -0500

ingtux gravatar image

updated 2021-02-09 03:51:13 -0500

It doesn't look like you can see any of the ROS packages. You need to source your noetic environment with source /opt/ros/noetic/setup.bash

To source automatically when opening a new terminal add it to your bashrc. In terminal:

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc

source ~/.bashrc

Then try rospack find geometry_msgs If it's still missing, try

sudo apt install ros-noetic-geometry-msgs

and try the rospack command again. If you can't install from apt sources you will need to build the package manually.

edit flag offensive delete link more

Comments

"It doesn't look like you can see any of the ROS packages." -- if that were the case, wouldn't a similar error have occurred for std_msgs?

abhishek47 gravatar image abhishek47  ( 2021-02-09 03:28:45 -0500 )edit
1

For all we know it could have an error for std_msgs too. I'd say the package just literally isn't installed and this post is completely unclear about how their setup is configured.

ingtux gravatar image ingtux  ( 2021-02-09 03:53:36 -0500 )edit

Question Tools

Stats

Asked: 2021-02-07 23:13:29 -0500

Seen: 695 times

Last updated: Feb 09 '21