Hello,
I’ve been trying to convert some Isaac ROS packages to lifecycle nodes, and I want to use the Nitros camera info messages instead of ROS messages in the nitros_image_switch_node. However, I’m getting this error when I switch the declaration type of sub_camera_info_
from message_filters::Subscriber<sensor_msgs::msg::CameraInfo>
to nvidia::isaac_ros::nitros::message_filters::Subscriber<nvidia::isaac_ros::nitros::NitrosCameraInfo>
in nitros_image_switch_node.hpp
.
Here’s the error in detail:
In file included from /workspaces/ros-ws/src/utilities/isaac_ros_nitros/isaac_ros_managed_nitros_examples/custom_nitros_message_filter/include/custom_nitros_message_filter/synchronizer_node.hpp:30,
from /workspaces/ros-ws/src/utilities/isaac_ros_nitros/isaac_ros_managed_nitros_examples/custom_nitros_message_filter/src/synchronizer_node.cpp:18:
/workspaces/ros-ws/install/share/isaac_ros_managed_nitros/gxf/include/isaac_ros_managed_nitros/managed_nitros_message_filters_subscriber.hpp: In instantiation of ‘class nvidia::isaac_ros::nitros::message_filters::Subscriber<nvidia::isaac_ros::nitros::NitrosCameraInfo>’:
/workspaces/ros-ws/src/utilities/isaac_ros_nitros/isaac_ros_managed_nitros_examples/custom_nitros_message_filter/include/custom_nitros_message_filter/synchronizer_node.hpp:58:3: required from here
/workspaces/ros-ws/install/share/isaac_ros_managed_nitros/gxf/include/isaac_ros_managed_nitros/managed_nitros_message_filters_subscriber.hpp:39:7: error: no type named ‘BaseType’ in ‘struct nvidia::isaac_ros::nitros::NitrosCameraInfo’
39 | class Subscriber
| ^~~~~~~~~~
/workspaces/ros-ws/install/share/isaac_ros_managed_nitros/gxf/include/isaac_ros_managed_nitros/managed_nitros_message_filters_subscriber.hpp:45:46: error: no type named ‘BaseType’ in ‘struct nvidia::isaac_ros::nitros::NitrosCameraInfo’
45 | typedef typename NitrosTypeViewT::BaseType MessageType;
| ^~~~~~~~~~~
/workspaces/ros-ws/install/share/isaac_ros_managed_nitros/gxf/include/isaac_ros_managed_nitros/managed_nitros_message_filters_subscriber.hpp:46:62: error: no type named ‘BaseType’ in ‘struct nvidia::isaac_ros::nitros::NitrosCameraInfo’
46 | typedef ::message_filters::MessageEvent<MessageType const> EventType;
I tried adding using BaseType = sensor_msgs::msg::CameraInfo
and
RCLCPP_USING_CUSTOM_TYPE_AS_ROS_MESSAGE_TYPE(nvidia::isaac_ros::nitros::NitrosCameraInfo, sensor_msgs::msg::CameraInfo);
to nitros_camera_info.hpp, but I still got the same error both times.
Thanks in advance!