mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-05 05:45:10 +00:00
fix tip resource data
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -125,6 +125,7 @@ def slave(
|
|||||||
executor.add_node(n)
|
executor.add_node(n)
|
||||||
|
|
||||||
if visual != "disable":
|
if visual != "disable":
|
||||||
|
from unilabos.ros.nodes.presets.joint_republisher import JointRepublisher
|
||||||
resource_mesh_manager = ResourceMeshManager(
|
resource_mesh_manager = ResourceMeshManager(
|
||||||
resources_mesh_config,
|
resources_mesh_config,
|
||||||
resources_config,
|
resources_config,
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ _msg_converter: Dict[Type, Any] = {
|
|||||||
Bool: lambda x: Bool(data=bool(x)),
|
Bool: lambda x: Bool(data=bool(x)),
|
||||||
str: str,
|
str: str,
|
||||||
String: lambda x: String(data=str(x)),
|
String: lambda x: String(data=str(x)),
|
||||||
Point: lambda x: Point(x=x.x, y=x.y, z=x.z) if not isinstance(x, dict) else Point(x=x.get("x", 0), y=x.get("y", 0), z=x.get("z", 0)),
|
Point: lambda x: Point(x=x.x, y=x.y, z=x.z) if not isinstance(x, dict) else Point(x=x.get("x", 0.0), y=x.get("y", 0.0), z=x.get("z", 0.0)),
|
||||||
Resource: lambda x: Resource(
|
Resource: lambda x: Resource(
|
||||||
id=x.get("id", ""),
|
id=x.get("id", ""),
|
||||||
name=x.get("name", ""),
|
name=x.get("name", ""),
|
||||||
@@ -141,7 +141,7 @@ _msg_converter: Dict[Type, Any] = {
|
|||||||
type=x.get("type", ""),
|
type=x.get("type", ""),
|
||||||
category=x.get("class", "") or x.get("type", ""),
|
category=x.get("class", "") or x.get("type", ""),
|
||||||
pose=(
|
pose=(
|
||||||
Pose(position=Point(x=float(x.get("position", {}).get("x", 0)), y=float(x.get("position", {}).get("y", 0)), z=float(x.get("position", {}).get("z", 0))))
|
Pose(position=Point(x=float(x.get("position", {}).get("x", 0.0)), y=float(x.get("position", {}).get("y", 0.0)), z=float(x.get("position", {}).get("z", 0.0))))
|
||||||
if x.get("position", None) is not None
|
if x.get("position", None) is not None
|
||||||
else Pose()
|
else Pose()
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user