CXX0025: 错误: 运算符要求类/结构/联合

在Visual Studio调试的时候,需要查看一个变量的值,比如images.size(),当我在监视下面输入这个变量时,显示CXX0025错误。该变量可是在函数中定义的,为什么在调试时显示该值会出错呢? 微软官方对这个错误也有专门的解释,“运算符要求结构/联合,采用struct或union类型表达式的运算符应用到非struct或union的表达式。类、结构或联合变量的组成部分必须具有完全限定名。不能在没有完全规范的情况下输入组成部分。”这里头的完全限定名和完全规范到底是个什么东西我也不是很清楚。最后解决方法为将images.size()改为images->size()即可。
(issacgym) abc@mypc:~/isaacgym/rsl_rl/legged_gym$ python legged_gym/scripts/train.py --task=anymal_c_flat --num_envs=1024 --headless Importing module 'gym_38' (/home/abc/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so) Setting GYM_USD_PLUG_INFO_PATH to /home/abc/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json PyTorch version 2.2.2 Device count 1 /home/abc/isaacgym/python/isaacgym/_bindings/src/gymtorch Using /home/abc/.cache/torch_extensions/py38_cu121 as PyTorch extensions root... Creating extension directory /home/abc/.cache/torch_extensions/py38_cu121/gymtorch... Emitting ninja build file /home/abc/.cache/torch_extensions/py38_cu121/gymtorch/build.ninja... Building extension module gymtorch... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/2] c++ -MMD -MF gymtorch.o.d -DTORCH_EXTENSION_NAME=gymtorch -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/abc/miniconda3/envs/issacgym/lib/python3.8/site-packages/torch/include -isystem /home/abc/miniconda3/envs/issacgym/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/abc/miniconda3/envs/issacgym/lib/python3.8/site-packages/torch/include/TH -isystem /home/abc/miniconda3/envs/issacgym/lib/python3.8/site-packages/torch/include/THC -isystem /home/abc/miniconda3/envs/issacgym/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DTORCH_MAJOR=2 -DTORCH_MINOR=2 -c /home/abc/isaacgym/python/isaacgym/_bindings/src/gymtorch/gymtorch.cpp -o gymtorch.o [2/2] c++ gymtorch.o -shared -L/home/abc/miniconda3/envs/issacgym/lib/python3.8/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o gymtorch.so Loading extension module gymtorch... Traceback (most recent call last): File "legged_gym/scripts/train.py", line 36, in <module> from legged_gym.envs import * File "/home/abc/isaacgym/rsl_rl/legged_gym/legged_gym/envs/__init__.py", line 33, in <module> from .base.legged_robot import LeggedRobot File "/home/abc/isaacgym/rsl_rl/legged_gym/legged_gym/envs/base/legged_robot.py", line 46, in <module> from legged_gym.utils.terrain import Terrain File "/home/abc/isaacgym/rsl_rl/legged_gym/legged_gym/utils/__init__.py", line 32, in <module> from .task_registry import task_registry File "/home/abc/isaacgym/rsl_rl/legged_gym/legged_gym/utils/task_registry.py", line 38, in <module> from rsl_rl.runners import OnPolicyRunner File "/home/abc/isaacgym/rsl_rl/rsl_rl/runners/__init__.py", line 8, in <module> from .on_policy_runner import OnPolicyRunner File "/home/abc/isaacgym/rsl_rl/rsl_rl/runners/on_policy_runner.py", line 15, in <module> from rsl_rl.algorithms import PPO, Distillation File "/home/abc/isaacgym/rsl_rl/rsl_rl/algorithms/__init__.py", line 8, in <module> from .distillation import Distillation File "/home/abc/isaacgym/rsl_rl/rsl_rl/algorithms/distillation.py", line 16, in <module> class Distillation: File "/home/abc/isaacgym/rsl_rl/rsl_rl/algorithms/distillation.py", line 19, in Distillation policy: StudentTeacher | StudentTeacherRecurrent TypeError: unsupported operand type(s) for |: 'type' and 'type'
最新发布
05-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值