Executable not found in libexec directory
Hi, I'm trying to create a package, but I get an error when I try to launch:
raise SubstitutionFailure(launch.substitutions.substitution_failure.SubstitutionFailure: executable 'server_node.py' not found on the libexec directory '/home/kmriiwa/Skrivebord/ros2_domain_bridge/install/rdb_server/lib/rdb_server'
I'm running Ubuntu 20.04.2 with ROS2 'Foxy'.
Here my launch file:
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
import launch_ros.actions
import sys
from rclpy.utilities import remove_ros_args
import argparse
def generate_launch_description(argv=sys.argv[1:]):
robot_name = 'tester'
robot_type = 'mobile'
server_port = '3001'
param_dir = LaunchConfiguration(
'param_dir',
default=os.path.join(
get_package_share_directory('rdb_server'),
'param',
'bringup.yaml'))
return LaunchDescription([
DeclareLaunchArgument(
'param_dir',
default_value=param_dir,
description='Full path to parameter file to load'),
launch_ros.actions.Node(
package="rdb_server",
executable="server_node.py",
name="server_node",
output="screen",
emulate_tty=True,
arguments=['-name', robot_name,'-type', robot_type, '-p', server_port],
parameters=[param_dir]),
])
Here is my CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(rdb_server)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclpy REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
# Install the python module for this package
ament_python_install_package(scripts/)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
# Install python scripts
install(
DIRECTORY launch param scripts
DESTINATION share/${PROJECT_NAME}
)
install(
PROGRAMS
scripts/server_node.py
scripts/server_sockets.py
scripts/serializer.py
scripts/thread_objects.py
DESTINATION lib/${PROJECT_NAME}
)
ament_package()
The contents of '/home/kmriiwa/Skrivebord/ros2_domain_bridge/install/rdb_server/lib/rdb_server' is as follows:
install/rdb_server/lib/rdb_server
->__init__.py
->serializer.py
->server_node.py
->server_sockets.py
->thread_objects.py
This error has me puzzled, as the missing file is clearly in the folder its directing me to...
Thanks for any tips!
As additional information - running
ros2 pkg executables rdb_server
returns nothing.