Ask Your Question
0

ROS Noetic Windows Package not found after catkin_make

asked 2020-09-27 19:48:02 -0500

cjonesy gravatar image

I'm running ROS Noetic on Windows (not WSL) and has ROS Noetic on Raspberry Pi. I have networking working so I can type rostopic list and I see the topic from the Raspberry Pi.

I have a folder called .\ros_catkin_ws\src\picar When I run catkin_make from \ros_catkin_ws\src it seems to run without error and I see it processing all my .msg files.

But when I try to run rostopic echo /healthpub I see:

C:\Users\cjones\Documents\School\Masters Computer Science\IoT\ros_catkin_ws\src\picar\src>rostopic echo /healthpub
ERROR: Cannot load message class for [picar/Health]. Are your messages built?

Out of curiosity I ran python and import rospy works but from picar.msg import Health the module isn't found. Also roscd picar says the package isn't found. So it's Compiling but for some reason not getting registered.

edit retag flag offensive close merge delete

Comments

@cjonesy, one possible problem is that you didn't invoke devel\setup.bat to merge your catkin workspace, so it wasn't visible to any ROS tools. I saw you asked the similar question here. It would be great to confirm your usage.

Sean Yen gravatar image Sean Yen  ( 2020-09-28 00:15:09 -0500 )edit

Isn't this your own #q361870, but then in Windows?

gvdhoorn gravatar image gvdhoorn  ( 2020-09-28 02:54:26 -0500 )edit

Here's a little more background. This is a small RC car with a Raspberry PI 4 on it along with an IMU, Ultrasonic Sensor, and RGB camera. Looking into using ROS for future semesters of a Masters CS class in IoT.

Ultimately I'm trying to run rviz and ros QT on Windows for visualization of sensor data and camera feed.

I just ran devel/setup.bat and tried roscd picar again, same result. Package couldn't be found. I tried running catkin_make after I ran setup.bat, same result. I went back to #q361870 and marked it as answered.

cjonesy gravatar image cjonesy  ( 2020-09-28 13:16:35 -0500 )edit

@cjonesy, are you able to detail how to replicate the catkin workspace (or share the sources)? Also, it might be useful to share your catkin_make (or catkin_make_isolated) console logs.

Sean Yen gravatar image Sean Yen  ( 2020-09-28 13:31:19 -0500 )edit

@Sean Yen: shouldn't @cjonesy run call devel\setup.bat instead of directly running it?

gvdhoorn gravatar image gvdhoorn  ( 2020-09-28 13:46:05 -0500 )edit

Call devel\setup.bat (or devel_isolated\setup.bat) first and then invoking the ROS tools should just work. The workflow should be the same regardless of the platform. And if @cjonesy does the same steps on Windows as those on Linux, but it still doesn't work. Then, I am curious of @cjonesy workspace and even the build logs. There might be something else to do with that.

Sean Yen gravatar image Sean Yen  ( 2020-09-28 13:56:35 -0500 )edit

My command line shortcut was pointing to setup.bat under /opt. So I changed that. But the target field was too long for windows so I moved the ros_catkin_ws to a shorter folder name. Interestingly I'm able to do rosrun picar script.py and it runs and the node will show up on the RPi when doing rosnode list.

However when I run another script, rosrun picar IMUPub.py (publishes IMU data) and run rostopic echo /orientation on the RPi it's fine. But when I try to run rostopic echo /orientation in Windows I get this error showing up on the RPi and no data in Windows.

[WARN] [1601350252.120357]: Could not process inbound connection: Client [/rostopic_13580_1601350253406] wants topic [/orientation] to have datatype/md5sum [picar/Orientation/c511045a954543345b7408c0167cc048], but our version has [picar/Orientation/6a19b328a3d727123946e0882ec5886a] Dropping connection.{'callerid': '/rostopic_13580_1601350253406', 'md5sum': 'c511045a954543345b7408c0167cc048', 'message_definition': "Header
cjonesy gravatar image cjonesy  ( 2020-09-28 22:34:16 -0500 )edit

And while rosrun works in Windows, roscd gives me this error:

C:\Users\cjones\Documents\ros_catkin_ws\src\picar\src>roscd picar
Traceback (most recent call last):
  File "c:\opt\ros\noetic\x64\bin\\rosfindpath.py", line 82, in <module>
    sys.exit(findpathmain(sys.argv[1:]))
  File "c:\opt\ros\noetic\x64\bin\\rosfindpath.py", line 74, in findpathmain
    rosdir = os.path.normpath(os.path.sep.join([package_dir, reldir]))
TypeError: sequence item 0: expected str instance, bytes found
( was unexpected at this time.

How do I post build logs? Just the output from catkin_make?

cjonesy gravatar image cjonesy  ( 2020-09-28 22:34:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-09-29 17:54:44 -0500

cjonesy gravatar image

updated 2020-09-29 17:55:33 -0500

The instructions for Windows 10 have the target as:

C:\Windows\System32\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64&& set ChocolateyInstall=c:\opt\chocolatey&& c:\opt\ros\noetic\x64\setup.bat

To make this work I had to change the target to:

C:\Windows\System32\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64&& set ChocolateyInstall=c:\opt\chocolatey&& c:\Users\cjones\Documents\ros_catkin_ws\devel\setup.bat

Obviously change your directory to wherever you have catkin_ws installed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2020-09-27 19:48:02 -0500

Seen: 414 times

Last updated: Sep 29 '20