No message from ComposableNode when set use_sim_time
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_LOCALHOST_ONLY=0
ROS_DISTRO=galactic
Currently, I am modified the launch file in https://github.com/ros-drivers/phidgets_drivers/blob/galactic/phidgets_spatial/launch/spatial-launch.py base on the second example in https://docs.ros.org/en/foxy/How-To-Guides/Launching-composable-nodes.html
However, something I find very strange. Whenever I set the usesimtime parameter to 'True' in the launch file, the node will not publish anything out.
Things I have tried.
- I have subscribed to /clock and verified that the clock is published by gzserver
My version of the launch file
import launch
from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes, Node
from launch_ros.descriptions import ComposableNode
from ament_index_python.packages import get_package_share_directory
import os
def generate_launch_description():
container = Node(
name='phidget_container',
namespace='',
package='rclcpp_components',
executable='component_container',
output='both',
)
load_composable_nodes = LoadComposableNodes(
target_container='phidget_container',
composable_node_descriptions=[
ComposableNode(
package='phidgets_spatial',
plugin='phidgets::SpatialRosI',
name='phidgets_spatial',
parameters=[{'use_sim_time': True}],
),
],
)
return launch.LaunchDescription([ container, load_composable_nodes, ])
Asked by sdu568 on 2023-05-07 20:23:05 UTC
Comments