Skip to content

Commit 704ac78

Browse files
authored
Merge pull request #115 from artnie/viz-marker-inf-time
viz markers have infinite lifetime
2 parents e02c28e + c391b24 commit 704ac78

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

examples/loading_worlds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This tutorial shows how to load a world description from a file into a `World` o
1919

2020
First, we need to compose the path to your world file.
2121

22-
```python
22+
```{code-cell} ipython3
2323
import logging
2424
import os
2525
@@ -34,7 +34,7 @@ Next we need to initialize a parser that reads this file. There are many parsers
3434
To read this specific urdf file, the `https://github.com/code-iai/iai_maps/tree/ros-jazzy/` repository needs to be installed
3535
inside your ROS2 workspace.
3636

37-
```python
37+
```{code-cell} ipython3
3838
from semantic_digital_twin.adapters.urdf import URDFParser
3939
4040
parser = URDFParser.from_file(apartment)

examples/visualizing_worlds.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ There are two recommended ways of doing it.
1919
One light weight way through RVIZ2 and a more heavy weight way through simulation with multiverse.
2020
Let's load a world first to get started.
2121

22-
```python
22+
```{code-cell} ipython3
2323
import logging
2424
import os
2525
@@ -35,7 +35,7 @@ world = URDFParser.from_file(apartment).parse()
3535
For the RVIZ2 way, ROS2 is needed. A caveat of this approach is that you have to manage the lifecycle of a ROS2 node yourself.
3636
We recommend to put the spinning into sperate threads and just shutdown the thread when exiting the system.
3737

38-
```python
38+
```{code-cell} ipython3
3939
from semantic_digital_twin.adapters.viz_marker import VizMarkerPublisher
4040
import threading
4141
import rclpy
@@ -50,7 +50,7 @@ viz = VizMarkerPublisher(world=world, node=node)
5050

5151
When you want to stop visualizing, you have to stop the visualizer and afterwards clean up ROS2.
5252

53-
```python
53+
```{code-cell} ipython3
5454
node.destroy_node()
5555
rclpy.shutdown()
5656
```

src/semantic_digital_twin/adapters/viz_marker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _make_marker_array(self) -> MarkerArray:
9797
b=float(collision.color.B),
9898
a=float(collision.color.A),
9999
)
100-
msg.lifetime = Duration(sec=100)
100+
msg.lifetime = Duration(sec=0)
101101

102102
if isinstance(collision, FileMesh):
103103
msg.type = Marker.MESH_RESOURCE

0 commit comments

Comments
 (0)