0
$\begingroup$

I am using ROS2 humble on Windows 10 and it is installed successfully. Now I am going through this tutorial for creating a workspace: https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html

But while I am using the “colcon build --merge install” command I face the following error message:

Failed <<< turtlesim [9.41s, exited with code 1]

Summary: 0 packages finished [9.75s]
1 package failed: turtlesim
1 package had stderr output: turtlesim
WNDPROC return value cannot be converted to LRESULT
TypeError: WPARAM is simple, so must be an int object (got NoneType)

You can see the full error message here:

enter image description here

however, it creates the “build, install and log folder” on my workspace, and also “ros2 run turtlesim turtlesim_node” opens the turtlesim.

It seems that the turtlesim package comes pre-built along with the ros2 installation and it is not calling the turtlesim package on my ros2_ws at all. So, when I modify the overlay like this:

https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html#modify-the-overlay

Nothing has happened; this is about 1 week I am stuck in this step, could anyone help me in this regard? I should mention that I installed “em”, “empty” and none of them fixed the problem.

$\endgroup$

2 Answers 2

0
$\begingroup$

In your build error message, it looks like you're missing a Python package. I found this https://answers.ros.org/question/257757/importerror-no-module-named-em-error/, which seems to have multiple ways to resolve this missing package. As you say you have installed it, you might need to check your python path so that the empy module can be found.

The turtlesim package comes pre-built when you installed ROS 2. If your build was successful, then you could overlay your turtlesim on the built-in one. As your build has not been successful, there is no binary file in your overlay, so the system uses the pre-built one.

$\endgroup$
2
  • $\begingroup$ Thanks for your reply. Based on the links you shared, I installed empy with "python3 -m pip install empy" command and now it is installed successfully by returning the following message: Successfully built empy Installing collected packages: empy Successfully installed empy-3.3.4 . Also I installed catkin_pkg with "pip install catkin_pkg" which returned to me "Requirement already satisfied" but now I have a "ModuleNotFoundError: No module named 'catkin_pkg'" error message when I am using "colcon build --merge-install" command. $\endgroup$
    – Mary
    Commented Nov 28, 2023 at 23:12
  • $\begingroup$ I don't have Windows, so I can't check, but it could be that you installed the python2 version of catkin_pkg. Your initial console output shows that you're using python3 to build your packages, so you'll want to ensure you're installing the python3 version of everything. You did that for empy alreardy. $\endgroup$
    – proan
    Commented Nov 28, 2023 at 23:53
0
$\begingroup$

I solved this problem by uninstalling "Python 3.12, 64-bit version" which had been installed on my system because I found the CMake error refers to a Python 3.12 on my system and I didn't know why it should have existed on my system (During ROS2 installation I had installed python 3.8, not 3.12). So, I called the following command in the command prompt, and I was assured an extra Python version was installed on my system:

> py -0

which returned:

Installed Pythons found by py Launcher for Windows
-3.8-64 *
-3.12-64

I decided to uninstall version 3.12 so that ROS2 just uses Python 3.8. Fortunately, it fixed my issue.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.