ppyolo在x3板上执行报错PermissionError: [Errno 1] Operation not permitted: './sbin/nginx'

我按照ppyolo部署在地平线x3上

在mono2d_trash_detection执行如下命令

source /opt/tros/local_setup.bash

export CAM_TYPE=usb

ros2 launch dnn_node_example hobot_dnn_node_example.launch.py config_file:=config/ppyoloworkconfig.json msg_pub_topic_name:=ai_msg_mono2d_trash_detection image_width:=1920 image_height:=1080

然后就报如下错误

sunrise@ubuntu:/opt/tros/lib/mono2d_trash_detection$ source /opt/tros/local_setup.bash

sunrise@ubuntu:/opt/tros/lib/mono2d_trash_detection$ export CAM_TYPE=usb

sunrise@ubuntu:/opt/tros/lib/mono2d_trash_detection$ ros2 launch dnn_node_example hobot_dnn_node_example.launch.py config_file:=config/ppyoloworkconfig.json msg_pub_topic_name:=ai_msg_mono2d_trash_detection image_width:=1920 image_height:=1080

[INFO] [launch]: All log files can be found below /home/sunrise/.ros/log/2023-02-27-21-14-18-185474-ubuntu-6635

[INFO] [launch]: Default logging verbosity is set to INFO

dnn_node_example_path is /opt/tros/lib/dnn_node_example

cp_cmd is cp -r /opt/tros/lib/dnn_node_example/config .

cp: cannot create directory ‘./config/efficient_det’: Permission denied

cp: cannot create regular file ‘./config/960_544.nv12’: Permission denied

cp: cannot create regular file ‘./config/coco.list’: Permission denied

cp: cannot create regular file ‘./config/efficient_det_workconfig.json’: Permission denied

cp: cannot create regular file ‘./config/efficientnet_lite0_workconfig.json’: Permission denied

cp: cannot create regular file ‘./config/fcosworkconfig.json’: Permission denied

cp: cannot create regular file ‘./config/imagenet.list’: Permission denied

cp: cannot create regular file ‘./config/mobilenet_ssd_workconfig.json’: Permission denied

cp: cannot create regular file ‘./config/mobilenet_unet_workconfig.json’: Permission denied

cp: cannot create regular file ‘./config/mobilenetv2workconfig.json’: Permission denied

cp: cannot create regular file ‘./config/raw_unet.jpeg’: Permission denied

cp: cannot create regular file ‘./config/target.jpg’: Permission denied

cp: cannot create regular file ‘./config/target_class.jpg’: Permission denied

cp: cannot create regular file ‘./config/test.jpg’: Permission denied

cp: cannot create regular file ‘./config/yolov2workconfig.json’: Permission denied

cp: cannot create regular file ‘./config/yolov3workconfig.json’: Permission denied

cp: cannot create regular file ‘./config/yolov5workconfig.json’: Permission denied

camera_type is usb

using usb cam

launch webserver

pwd_path is /opt/tros/lib/mono2d_trash_detection

webserver_path is /opt/tros/lib/websocket/webservice

Task exception was never retrieved

future: <Task finished name=‘Task-2’ coro=<LaunchService._process_one_event() done, defined at /opt/tros/lib/python3.8/site-packages/launch/launch_service.py:226> exception=PermissionError(1, ‘Operation not permitted’)>

Traceback (most recent call last):

File “/opt/tros/lib/python3.8/site-packages/launch/launch_service.py”, line 228, in _process_one_event

await self.__process_event(next_event)

File “/opt/tros/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/tros/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/tros/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/tros/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/tros/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/tros/lib/python3.8/site-packages/launch/action.py”, line 108, in visit

return self.execute(context)

File “/opt/tros/lib/python3.8/site-packages/launch/actions/include_launch_description.py”, line 130, in execute

launch_description = self.__launch_description_source.get_launch_description(context)

File “/opt/tros/lib/python3.8/site-packages/launch/launch_description_source.py”, line 84, in get_launch_description

self._get_launch_description(self.__expanded_location)

File “/opt/tros/lib/python3.8/site-packages/launch/launch_description_sources/python_launch_description_source.py”, line 51, in _get_launch_description

return get_launch_description_from_python_launch_file(location)

File “/opt/tros/lib/python3.8/site-packages/launch/launch_description_sources/python_launch_file_utilities.py”, line 68, in get_launch_description_from_python_launch_file

return getattr(launch_file_module, ‘generate_launch_description’)()

File “/opt/tros/share/websocket/launch/hobot_websocket_service.launch.py”, line 72, in generate_launch_description

os.chmod(nginx, stat.S_IRWXU)

PermissionError: [Errno 1] Operation not permitted: ‘./sbin/nginx’

config文件夹的百度链接

链接:百度网盘-链接不存在

提取码:1234

切换到root账号执行