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

Previously deleted node/console script names still showing with ros2 run

asked 2022-06-13 06:49:53 -0500

Reuben gravatar image

updated 2022-06-13 23:14:31 -0500

I initially made an error when editing my setup.py file (missed a comma I think) and when I used tab/auto completion with the ros2 run command, I was getting an incorrectly named node. However, despite editing the setup.py file and using colcon build, I still have the same issue. I initially thought it may have been due to how I added the new node (meant for ArUco tag detection) in the 'console script' section and edited that but it made no difference. As a result, now I have several options coming up with ros2 run even though they are incorrect.

I am using ROS2 Foxy on Ubuntu 20.04.4 LTS, would really appreciate any help.

This is my current setup.py file:

from setuptools import setup

package_name = 'tb3_obj_detection'

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']),
    ],
    install_requires=['setuptools'],
    zip_safe=True,
    maintainer='___',
    maintainer_email='____@todo.todo',
    description='TODO: Package description',
    license='TODO: License declaration',
    tests_require=['pytest'],
    entry_points={
        'console_scripts': [
            'img_publisher = tb3_obj_detection.camera_pub:main',
            'img_subscriber = tb3_obj_detection.camera_sub:main',
            'hand_detector = tb3_obj_detection.hand_detection:main',
            'hand_detector_tflite = tb3_obj_detection.hand_detection_tflite:main',
            'aruco_detection = tb3_obj_detection.aruco_detection:main',
        ],
    },
)

This is the output I get when trying to use ros2 run after sourcing my workspace, (https://ibb.co/L8dwDKW)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-06-13 11:26:32 -0500

ljaniec gravatar image

Can you try colcon build --cmake-clean-cache? You can try deleting the build and inc folders, then rebuild your workspace and source it again with source ~/dev_ws/install/setup.bash.


Also add the result of ros2 wtf/ros2 doctor if the above doesn't help.

edit flag offensive delete link more

Comments

1

Deleting the build & install folders and rebuilding the workspace worked! Thank you ljaniec

Reuben gravatar image Reuben  ( 2022-06-13 22:24:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-06-13 06:49:53 -0500

Seen: 238 times

Last updated: Jun 13 '22