Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No executable for depth_image_proc #823

Closed
sagardhatrak opened this issue Jun 14, 2023 · 5 comments
Closed

No executable for depth_image_proc #823

sagardhatrak opened this issue Jun 14, 2023 · 5 comments
Assignees
Labels

Comments

@sagardhatrak
Copy link

Not able to find the executables for depth_image_proc.

Following error is printed on command line:
ros2 launch depth_image_proc convert_metric.launch.py
[INFO] [launch]: All log files can be found below /home/sd/.ros/log/2023-06-14-12-24-37-298393-sd-virtual-machine-19878
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: Node.init() missing 1 required keyword-only argument: 'executable'

@mikeferguson
Copy link
Member

I think the issue here is actually just that the launch file has not been updated and you are on a newer version of ros2 than it was last tested on - try changing "node_executable" on line 73 to "executable"

@808brick
Copy link

808brick commented Jun 18, 2023

I think there is some other underlying problem with the package config, because ros2 pkg executables depth_image_proc yields no results. This is with a fresh install using apt install ros-humble-image-pipeline, and I tried installing from source.

If I had to take a guess, something is wrong with the way the executables are being created in the CMakeLists. Currently it seems like the rclcpp_components_register_nodes call is not working properly:
https://github.com/ros-perception/image_pipeline/blob/humble/depth_image_proc/CMakeLists.txt#L39

versus something like rclcpp_components_register_node which seems to be working just fine in the other image_pipeline packages, such as stereo_image_proc:
https://github.com/ros-perception/image_pipeline/blob/humble/stereo_image_proc/CMakeLists.txt#L29

UPDATE: After close inspection, it seems you guys want these image_proc nodes used as containerized nodelets instead of regular nodes. I'm not sure why this is, as it seems more straight forward to simply have a node to do conversions for you which is easily callable with ros2 run. I was able to get a crude example "working" in humble with the following, but this really does seem way more complex than it should be:

import launch
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode

def generate_launch_description():
    container = ComposableNodeContainer(
            name='my_container',
            namespace='',
            package='rclcpp_components',
            executable='component_container',
            composable_node_descriptions=[
                ComposableNode(
                    package='depth_image_proc',
                    plugin='depth_image_proc::PointCloudXyzNode',
                    name='point_cloud_xyz_node',
                    remappings=[
                        ('/image_rect', '/stereo/depth')
                        ('/camera_info', '/stereo/camera_info')
                    ]
                )
            ],
            output='screen',
    )

    return launch.LaunchDescription([container])

Hopefully this is helpful to someone.

@mikeferguson
Copy link
Member

Assigning myself to take a closer look - we should have both components AND executables available

@808brick the reason we want components available (ROS2 version of nodelets) is so that if you compose multiple components in an image pipeline, you don't have the overhead of serialize/deserialize and network transport to pass the messages between the nodes. There is a deep dive on the performance impacts of components in this paper: https://arxiv.org/pdf/2305.09933.pdf

@mikeferguson
Copy link
Member

Ok - diving in here - and yep - depth_image_proc definitely wasn't implemented correctly to allow this. I think image_proc worked once upon a time, but has since broken. #852 fixes both.

@mikeferguson mikeferguson mentioned this issue Jan 18, 2024
23 tasks
mikeferguson added a commit that referenced this issue Jan 18, 2024
This addresses
#823:

 * depth_image_proc was never implemented properly this way
 * image_proc might have once worked this way, but it appears upstream
has changed over time and it was no longer doing the job.
 * stereo_image_proc is actually implemented correctly - I just added a
comment

With this PR:

```
$ ros2 pkg executables image_proc
image_proc crop_decimate_node
image_proc crop_non_zero_node
image_proc debayer_node
image_proc image_proc
image_proc rectify_node
image_proc resize_node
```
```
$ ros2 pkg executables depth_image_proc
depth_image_proc convert_metric_node
depth_image_proc crop_foremost_node
depth_image_proc disparity_node
depth_image_proc point_cloud_xyz_node
depth_image_proc point_cloud_xyz_radial_node
depth_image_proc point_cloud_xyzi_node
depth_image_proc point_cloud_xyzi_radial_node
depth_image_proc point_cloud_xyzrgb_node
depth_image_proc point_cloud_xyzrgb_radial_node
depth_image_proc register_node
```
mikeferguson added a commit to mikeferguson/image_pipeline that referenced this issue Jan 18, 2024
This addresses
ros-perception#823:

 * depth_image_proc was never implemented properly this way
 * image_proc might have once worked this way, but it appears upstream
has changed over time and it was no longer doing the job.
 * stereo_image_proc is actually implemented correctly - I just added a
comment

With this PR:

```
$ ros2 pkg executables image_proc
image_proc crop_decimate_node
image_proc crop_non_zero_node
image_proc debayer_node
image_proc image_proc
image_proc rectify_node
image_proc resize_node
```
```
$ ros2 pkg executables depth_image_proc
depth_image_proc convert_metric_node
depth_image_proc crop_foremost_node
depth_image_proc disparity_node
depth_image_proc point_cloud_xyz_node
depth_image_proc point_cloud_xyz_radial_node
depth_image_proc point_cloud_xyzi_node
depth_image_proc point_cloud_xyzi_radial_node
depth_image_proc point_cloud_xyzrgb_node
depth_image_proc point_cloud_xyzrgb_radial_node
depth_image_proc register_node
```
mikeferguson added a commit to mikeferguson/image_pipeline that referenced this issue Jan 18, 2024
This addresses
ros-perception#823:

 * depth_image_proc was never implemented properly this way
 * image_proc might have once worked this way, but it appears upstream
has changed over time and it was no longer doing the job.
 * stereo_image_proc is actually implemented correctly - I just added a
comment

With this PR:

```
$ ros2 pkg executables image_proc
image_proc crop_decimate_node
image_proc crop_non_zero_node
image_proc debayer_node
image_proc image_proc
image_proc rectify_node
image_proc resize_node
```
```
$ ros2 pkg executables depth_image_proc
depth_image_proc convert_metric_node
depth_image_proc crop_foremost_node
depth_image_proc disparity_node
depth_image_proc point_cloud_xyz_node
depth_image_proc point_cloud_xyz_radial_node
depth_image_proc point_cloud_xyzi_node
depth_image_proc point_cloud_xyzi_radial_node
depth_image_proc point_cloud_xyzrgb_node
depth_image_proc point_cloud_xyzrgb_radial_node
depth_image_proc register_node
```
@mikeferguson
Copy link
Member

Merged into rolling, working on iron/humble back ports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants