Open Dawn-and-Night opened 4 months ago
Yes, I'm sure it's possible, but I don't know of anyone who has tried this yet. I'm not a Windows developer myself, so I don't know where the issues might arise. I'm happy to add a CI job for Windows 2019/2022 and accept PRs to help make this repo compatible with Windows though.
Thank you for your response @marip8 . I am trying to use Noether in a ROS2-Humble environment on Windows 10. My VTK version is 9.1, and my PCL version is 1.12.1. When launching noether_gui_app.exe for path planning, it crashes when using the following tools. If convenient, please assist me. The two images below show the options that cause the crash and the error messages.
By rewriting the widget files of these tools that would crash, and modifying the directly using-invoked parts according to the relevant files of the tools that work, everything is now functioning properly. It's quite strange why this issue occurs, as everything works fine on Ubuntu.
Interesting errors. I'm not sure I've seen anything like that before. What version of Qt did you compile this with? It looks like some component of Qt might be calling a private method that is different in your version (or the Windows version) vs the Ubuntu version. I have only ever compiled this repo with Qt 5.
By rewriting the widget files of these tools that would crash, and modifying the directly using-invoked parts according to the relevant files of the tools that work, everything is now functioning properly.
Glad to hear you were able to come up with a fix. What did you end up having to change? Was it a change to a .ui
file or some actual code changes?
I compiled this using Qt5.15.3 and solved it by making minor modifications to some of the planner's widget files. Taking SnakeOrganicalModifier as an example, referring to other components of the Tool Path Planner that can run normally, I modified its _widget. h and _widget. cpp files, as shown in the figure.
Summarizing in diff format for clarity:
#pragma once
#include <noether_gui/widgets.h>
#include <noether_tpp/core/tool_path_modifier.h>
namespace noether
{
struct SnakeOrganizationModifierWidget : public ToolPathModifierWidget
{
+ Q_OBJECT
public:
- using ToolPathModifierWidget::ToolPathModifierWidget;
+ SnakeOrganizationModifierWidget(QWidget* parent = nullptr);
ToolPathModifier::ConstPtr create() const override;
};
} // namespace noether
#include <noether_gui/widgets/tool_path_modifiers/snake_organization_modifier_widget.h>
+ #include <noether_gui/utils.h>
#include <noether_tpp/tool_path_modifiers/snake_organization_modifier.h>
+ #include <QFormLayout>
+ #include <QLabel>
+ #include <QDoubleSpinBox>
namespace noether
{
+ SnakeOrganizationModifier::SnakeOrganizationModifier(QWidget* parent)
+ : QWidget(parent)
+ {
+ auto layout = new QFormLayout(this);
+ }
ToolPathModifier::ConstPtr SnakeOrganizationModifierWidget::create() const
{
return std::make_unique<SnakeOrganizationModifier>();
}
} // namespace noether
Some thoughts:
Q_OBJECT
macro alone doesn't do anything because we are not currently invoking the Qt MOC on any widget files in this repo in the CMakeListsnoether_gui/utils.h
, QLabel
, and QDoubleSpinBox
seems unnecessary as nothing from those files is used by this particular widgetIt would be interesting to find the set of minimal changes that fixes the issue you encountered. It doesn't feel like any of these changes should have fixed it, but I guess it's hard to tell
Yes, it's really strange, the fact that the original program works well under Ubuntu means that the code is not problematic.
Those headers were added because they were in the example that was copied, and should have no effect here.
In this can effect should be only 2: SnakeOrganizationModifierWidget (QWidget * parent = nullptr);
SnakeOrganizationModifier::SnakeOrganizationModifier(QWidget* parent) : QWidget(parent) { auto layout = new QFormLayout(this); } It's amazing how this modification works.
I want to configure Noether in the ROS 2 Humble environment on Windows 10. Is this possible?