Skip to content

Commit

Permalink
fix: Update rviz template fixed frame with prefix independently of th…
Browse files Browse the repository at this point in the history
…e robot name.
  • Loading branch information
Imaniac230 committed Oct 29, 2024
1 parent 4fd5796 commit b55c710
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spot_driver/launch/rviz.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ def create_rviz_config(robot_name: str, tf_prefix: str) -> None:
with open(RVIZ_TEMPLATE_FILENAME, "r") as template_file:
config = yaml.safe_load(template_file)

if robot_name:
if tf_prefix:
# replace fixed frame with robot body frame
config["Visualization Manager"]["Global Options"]["Fixed Frame"] = f"{tf_prefix}vision"
if robot_name:
# Add robot models for each robot
for display in config["Visualization Manager"]["Displays"]:
if "RobotModel" in display["Class"]:
Expand Down

0 comments on commit b55c710

Please sign in to comment.