Skip to content

ROS2 Python script to transform obstacles to LaserScan data #1

@chasefirefly03

Description

@chasefirefly03

Create a ROS2 Python node that:

  1. Gets TF transformations for obstacles (obstacle_0, obstacle_1, etc.)
  2. Transforms these obstacles to LaserScan format (/scan topic)
  3. Allows setting obstacle size (default 0.2m)

The node should:

  • Subscribe to TF transformations
  • Detect all obstacle frames (obstacle_0, obstacle_1, etc.)
  • Calculate the position of these obstacles relative to the robot's frame
  • Convert these positions into fake laser scan points
  • Publish these points as a LaserScan message on the /scan topic
  • Allow configuration of the obstacle size (diameter)

This will make obstacles detected in the system appear in the laser scan data as if they were detected by the actual laser scanner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions