RosJect did work but now shows error

Hi @vkuehn ,

I am glad you attempted to fix it!

I have one suggestion though, try this:

  1. Save your entire project package files by downloading them to your computer.
  2. Delete the rosject and get a copy of the same rosject again.
  3. Upload the project files back into your new rosject workspace.

I have to say this would be again a 50/50 probability of getting things to work. But you can still try it.

Regards,
Girish

Hi @girishkumar.kannan ,

yes that would be a solution thought.
However I will give the friends from theconstruct a chance to analyse the problem.
I do another course in parallel and will see in a few day’s where I am with this.

Regards,
Volker

1 Like

I’ve been investigating and I found it really difficult to have this problem solved.

Let us see if any of the @staff members can help.

Hello @vkuehn ,

Cold you share your rosject with us, so that we can have a look and test it directly? Also, please indicate the steps in order to reproduce the error.

Hello @albertoezquerro,

It’s now public as Copy ROS2 Basics Python Real Robot Project

Thanks in advance

Hi @vkuehn ,

Good News ! I have finally SOLVED your problem !

@ralves and @albertoezquerro : Please scroll down to see the actual cause of this problem!

All along the problem was the non-ASCII character that I mentioned in the solution of my actual post about this problem. Here: ROSDS - colcon build fails - environment dependency requirement - #8 by girishkumar.kannan

I am going to share you some pictures to understand the problem easily!

The actual cause of this problem:

So, when someone copy-pastes the message file contents from the jupyter notebook into their package’s FindWall.srv file, this problem happens!
The bad thing here is that the online IDE does not show any hidden non-ASCII characters present in the file.
This causes the problem during compilation / building.

THE FIX:
Simply remove / delete the unwanted character from the service message.
@ralves and @albertoezquerro : Also, please delete this on the jupyter notebook, so new students will not have the same issue!

Sorry for the long post (picture is worth a thousand words!)

Cheers and Regards,
Girish

Hi @girishkumar.kannan ,

Thanks a lot for the research !
Unfortunatetly this is not the root cause in my case thought.
I have checked with cat -T to make sure the FindWall.srv does not contain any hidden characters.
However with your python iteration it shows

b'\xe2\x80\x8b\n'
b'---\n'
b'bool wallfound'

I’ll clean and check again

Regards,
Volker

Hi @girishkumar.kannan, @albertoezquerro

checked and Gris is right the hidden character was one issue !
However still the launch is having an issue. I’ll investigate later. But maybe Alberto has more insights ?

Regards,
Volker

Hi @vkuehn ,

If you have the service message package successfully compiled and you still have issues with your package launch, maybe I can still help you out.

Just post the new error (as text) that your are facing.

– Girish

EDIT: I checked the outputs of cat .... Only cat -A works correctly. cat -T only shows tab characters.
The outputs look very weird, that is why I chose to use python.

1 Like

Hi @girishkumar.kannan,

thanks for the offer and the research again !!
Actually

ros2 launch wall_follower wall_following.launch.py

results in

launch.substitutions.substitution_failure.SubstitutionFailure: executable 'wall_following' not found on the libexec directory '/home/user/ros2_ws/install/wall_follower/lib/wall_follower'

even so that the launch file ./launch/wall_following.launch.py has

            package='wall_follower',
            executable='wall_following',

and ~/ros2_ws/src/wall_follower/wall_follower/wall_following.py exists

so it should launch even if it would have a failure, no ?

Regrards,
V

Hi @vkuehn ,

I just referred to your directory tree structure from your above posts.

It seems that your command line is wrong. Your launch file is correct though.

In your wall_follower package, your python file is wall_following.py which is correctly mentioned in launch file’s executable field.

This command line is wrong.

The correct command line would be:
ros2 launch wall_follower wall_follower.launch.py

Try this and let me know if that works!

Regards,
Girish

Hi @girishkumar.kannan,

the filestructe looks now like that

image

which is probably more clean

Regards,
Volker

Hi @vkuehn ,

Just realized this error:

The solution, I guess, is simple. Delete your build, install and log folders within ros2_ws directory and redo

colcon build --packages-select wall_follower_srv wall_follower && source install/setup.bash

Let me know if this works now!

Regards,
Girish

EDIT: Just added your service message package into the colcon build command line

Hi @girishkumar.kannan,

no it doesn’t and shows the same error.
That is the interesting/strange/painful thing and I have shared the Copy ROS2 Basics Python Real Robot Project in hope the construct team can help.

Regards,
Volker

EDIT: tried your edit also

Hi @vkuehn ,

Could you post your current setup.py file contents for wall_follower package please?

– Girish

Hi @girishkumar.kannan ,

here it is

from setuptools import setup
import os
from glob import glob

package_name = 'wall_follower'

setup(
    name=package_name,
    version='0.0.0',
    packages=[package_name],
    data_files=[
        ('share/ament_index/resource_index/packages',
            ['resource/' + package_name]),
        ('share/' + package_name, ['package.xml']),
        (os.path.join('share', package_name), glob('launch/*.launch.py'))
    ],
    install_requires=['setuptools'],
    zip_safe=True,
    maintainer='user',
    maintainer_email='user@todo.todo',
    description='TODO: Package description',
    license='TODO: License declaration',
    tests_require=['pytest'],
    entry_points={
        'console_scripts': [
            'wall_following = wall_follower.wall_following:main'
            'wall_finder = wall_follower.wall_finder:main'
        ],
    },
)

–Volker

Hi @vkuehn ,

Your problem seems to be strange! Your setup.py file seems to be correct.

I tried to find your Copy ROS2 Basics Python Real Robot Project but I guess it is private.
I cannot view it, if you can check again and make it public, I can check it out and help you further!

Regards,
Girish

EDIT: I have finished this course and got my certificate, so I can assure you that I will not steal any of your program. [Just wanted to say!]

Hi @girishkumar.kannan,

I appreciate your help and would share it but it is complainin that it is a copy of a private one.

@albertoezquerro
you can probably find it as suggested.
If not I would save src, delete it, start a new copy.

Regards,
Volker

Hi @vkuehn ,

Yeah, I just realized that. It said the same thing for me too! No problem!
Sorry I am unable to help you!

Cheers and Regards,
Girish

1 Like

cheers @girishkumar.kannan

1 Like