Integration of realsense d435i camera and openvins
Hi everyone, I am updating my question, I am trying to integrate the realsense d435i camera and openvins nodes in one launch file in ROS2 Foxy. I have converted the openvins node into a composable node and am running it with the realsense composable node in a single container, the launch file runs and the opevins node subscribes to the camera and imu topics but still I don't see any output on /trackhist or /odomimu. If anybody has worked on this before and encountered this issue, please help me out. Here is the launch file -
import os
from ament_index_python.packages import get_package_share_directory, get_package_prefix
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, LogInfo, OpaqueFunction
from launch.conditions import IfCondition
from launch.substitutions import LaunchConfiguration, TextSubstitution
from launch_ros.actions import Node
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
def generate_launch_description():
# Define launch arguments
launch_args = [
DeclareLaunchArgument(name="namespace", default_value="ov_msckf", description="namespace"),
DeclareLaunchArgument(name="ov_enable", default_value="true", description="enable OpenVINS node"),
DeclareLaunchArgument(name="rviz_enable", default_value="false", description="enable rviz node"),
DeclareLaunchArgument(name="config", default_value="rs435i", description="euroc_mav, tum_vi, rpng_aruco..."),
DeclareLaunchArgument(name="config_path", default_value="", description="path to estimator_config.yaml. If not given, determined based on provided 'config' above"),
DeclareLaunchArgument(name="verbosity", default_value="INFO", description="ALL, DEBUG, INFO, WARNING, ERROR, SILENT"),
DeclareLaunchArgument(name="use_stereo", default_value="true", description="if we have more than 1 camera, if we should try to track stereo constraints between pairs"),
DeclareLaunchArgument(name="max_cameras", default_value="2", description="how many cameras we have 1 = mono, 2 = stereo, >2 = binocular (all mono tracking)"),
DeclareLaunchArgument(name="save_total_state", default_value="false", description="record the total state with calibration and features to a txt file"),
]
config_path = os.path.join(
get_package_share_directory('ov_msckf'),
'config', 'rs_d435', 'estimator_config.yaml')
# Config file
config_file = os.path.join(
get_package_share_directory('argos_launch'),
'config', 'sensors', 'realsense_ov.yaml')
realsense_node = ComposableNode(
namespace="camera",
package='realsense2_camera',
plugin='realsense2_camera::RealSenseNodeFactory',
parameters=[config_file],
remappings = [("/camera/imu", "/imu0"),
("/camera/infra1/image_rect_raw", "/cam1/image_raw"),
("/camera/infra2/image_rect_raw", "/cam0/image_raw")]
)
open_vins_node = ComposableNode(
package='ov_msckf',
plugin='ov_msckf::OpenVinsNode',
parameters=[
{"verbosity": LaunchConfiguration("verbosity")},
{"use_stereo": LaunchConfiguration("use_stereo")},
{"max_cameras": LaunchConfiguration("max_cameras")},
{"save_total_state": LaunchConfiguration("save_total_state")},
#{"config_path": config_path},
],
)
container = ComposableNodeContainer(
name='my_container',
namespace='',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[
realsense_node,
open_vins_node,
],
output='screen',
)
ld = LaunchDescription(launch_args)
ld.add_action(container)
return ld