launch file argument type error, and displaying in Rviz
Hi, I am using ROS2 foxy, and tried to run
ros2 launch depthai_examples yolov4_publisher.launch.py camera_model:=OAK-D-LITE and also
ros2 launch depthai_examples mobile_publisher.launch.py camera_model=:OAK-D-LITE
but it gave an error about launch file parameter error as below
[INFO] [launch]: All log files can be found below /home/nvidia/.ros/log/2022-04-27-17-48-18-439373-nano2gb-ros2-9224
[INFO] [launch]: Default logging verbosity is set to INFO
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:226> exception=TypeError("Allowed value types are bytes, bool, int, float, str, Sequence[bool], Sequence[int], Sequence[float], Sequence[str]. Got <class 'NoneType'>.If the parameter is meant to be a string, try wrapping it in launch_ros.parameter_descriptions.ParameterValue(value, value_type=str)")>
Traceback (most recent call last):
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event
visit_all_entities_and_collect_futures(entity, self.__context))
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
[Previous line repeated 1 more time]
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
sub_entities = entity.visit(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
return self.execute(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/actions/node.py", line 444, in execute
self._perform_substitutions(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/actions/node.py", line 399, in _perform_substitutions
evaluated_parameters = evaluate_parameters(context, self.__parameters)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/utilities/evaluate_parameters.py", line 160, in evaluate_parameters
output_params.append(evaluate_parameter_dict(context, param))
File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/utilities/evaluate_parameters.py", line 95, in evaluate_parameter_dict
raise TypeError(
TypeError: Allowed value types are bytes, bool, int, float, str, Sequence[bool], Sequence[int], Sequence[float], Sequence[str]. Got <class 'NoneType'>.If the parameter is meant to be a string, try wrapping it in launch_ros.parameter_descriptions.ParameterValue(value, value_type=str)
I found that in ros2 foxy, in the launch file, it shouldn't be empty on default value of argument. Please check on here, someone mentioned about this issue on other project.
But If I comment out the line related to nn_path, I could launch without error.
Another question is, my OAK-D-Lite is connecting to my Jetson nano, but I would like to see the color image or detection image on my laptop from Rviz2, there are topics appear on Rviz as /color/image and /color/mobilenet_detections, so once I added this topic, it seems to display only few frames and freeze, so the image data won't come anymore..
If I do ros2 topic echo /color/image on my laptop, the data also arrived few frames message then stuck.. but if I echo on Jetson nano (via ssh terminal) I could see the stream of data. Do you have any idea what's happened here?
Thanks. Yes. this is a known issue. We will fix it. Sorry for the trouble. This started appearing on the new updates from foxy. they introduced a bug. it works fine on Galactic.
the data also arrived few frames message then stuck.. but if I echo on Jetson nano (via ssh terminal) I could see the stream of data. Do you have any idea what's happened here?
More likely a bandwidth issue. Try changing the network or DDS being used.
Closing due to inactivity, please reopen if there are still questions.