HoangGiang93 / URoboViz

Unreal plugin for robot visualisation using ROS connecting with WebSockets.
MIT License
69 stars 7 forks source link

ue4.27.2 compile error #11

Closed PiggyGaGa closed 2 weeks ago

PiggyGaGa commented 3 weeks ago

when i use ue4.27.2 on win10, and installed this plugin according to the wiki, compile process met some errors, can you help me

1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/Sensors/Lidar.cpp(102): error C2440: “初始化”: 无法从“void”转换为“float”
1>  G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/Sensors/Lidar.cpp(102): note: void 类型的表达式不能转换为其他类型
1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/Sensors/Lidar.cpp(103): error C2440: “初始化”: 无法从“void”转换为“float”
1>  G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/Sensors/Lidar.cpp(103): note: void 类型的表达式不能转换为其他类型
1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/StateManager.cpp(88): error C2039: "GetActorLabel": 不是 "AActor" 的成员
1>  D:\ProgramFiles\Games\UE_4.27\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(132): note: 参见“AActor”的声明
1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/StateManager.cpp(97): error C2039: "SetActorLabel": 不是 "AActor" 的成员
1>  D:\ProgramFiles\Games\UE_4.27\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(132): note: 参见“AActor”的声明
1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/StateManager.cpp(210): error C2039: "GetActorLabel": 不是 "AActor" 的成员
1>  D:\ProgramFiles\Games\UE_4.27\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(132): note: 参见“AActor”的声明
1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/StateManager.cpp(210): error C2039: "__this": 不是 "AActor" 的成员
1>  D:\ProgramFiles\Games\UE_4.27\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(132): note: 参见“AActor”的声明
1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/StateManager.cpp(265): error C2039: "GetActorLabel": 不是 "AActor" 的成员
1>  D:\ProgramFiles\Games\UE_4.27\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(132): note: 参见“AActor”的声明
1>G:/AI/Robot/VisRobot/Plugins/URoboViz/Source/URoboViz/Private/StateManager.cpp(265): error C2039: "__this": 不是 "AActor" 的成员
1>  D:\ProgramFiles\Games\UE_4.27\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(132): note: 参见“AActor”的声明
HoangGiang93 commented 3 weeks ago

ok I don't know why it doesn't work in your case, but I can help you to identify the problem and maybe you can find a solution for yourself. 1) error in Lidar.cpp(102), I think there are some problems when passing this function. You can quick fix it by replacing FConversions::MToCm to 100 * , for example float RangeMinInCm = 100 * RangeMin; 2) error in StateManager.cpp(88) and below. For some reasons the GetActorLabel doesn't work, it might be because you didn't build it in the Editor mode, but in Game mode. Anyway, I think the StateManager is deprecated since I wanted to change the interface from ROS to ZMQ and somehow I forgot to change it back. You can remove StateManager.cpp in Private, StateManager.h in Include and its variable in RoboManager.h and RoboManager.cpp.

Hope it helps

HoangGiang93 commented 2 weeks ago

I will close the issue here, if you have any issue please let me know

PiggyGaGa commented 19 hours ago

ok I don't know why it doesn't work in your case, but I can help you to identify the problem and maybe you can find a solution for yourself.

  1. error in Lidar.cpp(102), I think there are some problems when passing this function. You can quick fix it by replacing FConversions::MToCm to 100 * , for example float RangeMinInCm = 100 * RangeMin;
  2. error in StateManager.cpp(88) and below. For some reasons the GetActorLabel doesn't work, it might be because you didn't build it in the Editor mode, but in Game mode. Anyway, I think the StateManager is deprecated since I wanted to change the interface from ROS to ZMQ and somehow I forgot to change it back. You can remove StateManager.cpp in Private, StateManager.h in Include and its variable in RoboManager.h and RoboManager.cpp.

Hope it helps

Thank you for your answer!