Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-137 #155

Open
wants to merge 1 commit into
base: humble-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 6 additions & 31 deletions manager/manager/launcher/launcher_visualization.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from src.manager.libs.process_utils import get_class, class_from_module
from typing import Optional
from pydantic import BaseModel
from typing import Optional, ClassVar
from pydantic import BaseModel, ConfigDict


from src.manager.libs.process_utils import get_class, class_from_module, get_ros_version
Expand All @@ -18,24 +18,6 @@
"internal_port": 5901,
}
],
"bt_studio": [
{
"type": "module",
"module": "console",
"display": ":1",
"external_port": 1108,
"internal_port": 5901,
},
{
"type": "module",
"width": 1024,
"height": 768,
"module": "gazebo_view",
"display": ":2",
"external_port": 6080,
"internal_port": 5900,
},
],
"gazebo_gra": [
{
"type": "module",
Expand Down Expand Up @@ -75,7 +57,7 @@
"type": "module",
"width": 1024,
"height": 768,
"module": "gazebo_view",
"module": "robot_display_view",
"display": ":2",
"external_port": 6080,
"internal_port": 5900,
Expand All @@ -100,25 +82,18 @@
],
"physic_rae": [
{
"type": "module",
"module": "console",
"display": ":1",
"external_port": 1108,
"internal_port": 5901,
},
{
"type": "module",
"width": 1024,
"height": 768,
"module": "robot_display_view",
"display": ":2",
"external_port": 2303,
"internal_port": 5902,
},
}
],
}


class LauncherVisualization(BaseModel):
running: ClassVar[bool]
module: str = ".".join(__name__.split(".")[:-1])
visualization: str
launchers: Optional[ILauncher] = []
Expand Down
20 changes: 18 additions & 2 deletions manager/manager/launcher/launcher_world.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional
from typing import Optional, ClassVar
from pydantic import BaseModel

from src.manager.libs.process_utils import get_class, class_from_module, get_ros_version
Expand Down Expand Up @@ -48,11 +48,27 @@
}
],
},
"physical": {},
"physical": {"1": [
{
"type": "module",
"module": "ros_api",
"parameters": [],
"launch_file": [],
}
],
"2": [
{
"type": "module",
"module": "ros2_api",
"parameters": [],
"launch_file": [],
}
],},
}


class LauncherWorld(BaseModel):
running: ClassVar[bool]
world: str
launch_file_path: str
module: str = ".".join(__name__.split(".")[:-1])
Expand Down
2 changes: 1 addition & 1 deletion manager/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def on_prepare_visualization(self, event):
)
self.visualization_launcher.run()

if visualization_type == "gazebo_rae":
if visualization_type == "gazebo_rae" or visualization_type == "physic_rae":
self.gui_server = Server(2303, self.update)
self.gui_server.start()

Expand Down