Executable not found on the libexec directory when i try to launch

trying to execute my launch file but receiving this error

1682163691.0875740 [INFO] [launch]: All log files can be found below /home/robotics23/.ros/log/2023-04-22-11-41-31-087003-robotics23-vm-77887
1682163691.0876734 [INFO] [launch]: Default logging verbosity is set to INFO
1682163691.1793113 [ERROR] [launch]: Caught exception in launch (see debug for traceback): executable 'assignment2_task1' not found on the libexec directory '/home/robotics23/dev_ws/install/Assignment2/lib/Assignment2' 

When i run this following code

ros2 launch Assignment2 compulsory.launch.xml 

the compulsory.launch.xml file is like below

<launch>

 <set_parameter name="use_sim_time" value="true" />
<!-- 'use_sim_time' will be set on all nodes following this line -->
  <!-- Create a launch argument. It can be used to supply values on the command line, 
       with the following syntax: ros2 launch <package_name> <launch_file> thymio_name:=thymio1 -->
  <arg name="thymio_name" default="thymio0"/>
  
  <!-- 
       Start a ROS node, equivalent to: ros2 run <package_name> <executable_name> 
       
       The `namespace` option launches controller_node in the namespace defined by 
       the `thymio_name` launch argument (default: /thymio0). Combined with the use of
       relative topic names in controller_node, this provides a nice way to specify which 
       robot this node should control.
       
       The `output` option configures the node to print to the terminal, to help with debugging.
       By default, nodes launched from a launch file print their output to a log file.
  -->
  <node pkg="Assignment2" exec="assignment2_task1" namespace="$(var thymio_name)" output='screen' />
</launch>

and the setup.py is like that

from setuptools import setup
from glob import glob
package_name = 'Assignment2'


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']),
        ('share/' + package_name + '/launch',glob('launch/*.launch.*'))
    ],
    install_requires=['setuptools'],
    zip_safe=True,
    maintainer='robotics23',
    maintainer_email='robotics23@todo.todo',
    description='TODO: Package description',
    license='TODO: License declaration',
    tests_require=['pytest'],
    entry_points={
        'console_scripts': [
            'assignment2_task1 = Assignment2.assignment2_task1:main'
            'assignment2_task3 = Assignment2.assignment2_task3:main'
            'assignment2_task5 = Assignment2.assignment2_task5:main'
            
            
            
        ],
    },
)

and my assignment2_task1.py file is like below

#!/usr/bin/env python

import rclpy
import math
import numpy as np
from utils import ThymioController



class ThymioController_Task1(ThymioController):
#    def __init__(self):
#    	super().__init__('assignment2_task1')
    def run(self, desired_radius = 0.25):
        """Controls the Thymio."""

        rclpy.loginfo('%s Following an 8 trajectory...' % self.name)

        linear_speed = 0.14
        angular_speed = linear_speed / desired_radius
        circumference = 2 * np.pi * desired_radius

        time_needed = (circumference / linear_speed)

        rclpy.loginfo('%s Time needed for completing a circle: %f' % (self.name, time_needed))
        time_start = rclpy.Time.now().to_sec()

        while not rclpy.is_shutdown():
            self.move(linear_speed, angular_speed)

            if (rclpy.Time.now().to_sec() - time_start) > time_needed:
                time_start = rclpy.Time.now().to_sec()
                angular_speed = -angular_speed




if __name__ == '__main__':

    controller = ThymioController_Task1('assignment2_task1')

    try:

        controller.run()


    except rclpy.ROSInterruptException as e:
        pass

Can someone help me about that ? i rechecked name of exec idk where is the problem

And the hierarchy of the documents is like below

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.