autowarefoundation / AWSIM-Labs

Open source simulator for self-driving vehicles
https://autowarefoundation.github.io/AWSIM-Labs/
Other
7 stars 7 forks source link

Add feature to spawn NPC from RVIZ #65

Open mitsudome-r opened 2 months ago

mitsudome-r commented 2 months ago

Description

We could add a feature to AWSIM to receive a dummy perception message from RVIZ to spawn an NPC vehicle at user's demands just like in this tutorial: https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/#placing-dummy-objects

SujayAmberkar commented 1 month ago

I'm getting this message when I listen to the /simulation/dummy_perception_publisher/object_info, here the position is around 81000 & 49000 for x and y whenever I create a dummy NPC in rviz.

  1. Should I be using this position?
  2. Should it be converted?
initial_state:
  pose_covariance:
    pose:
      position:
        x: 81383.5859375
        y: 49919.77734375
        z: 0.0
      orientation:
        x: 0.0
        y: 0.0
        z: 0.2974268081526713
        w: 0.95474462229023
mozhoku commented 1 month ago

@SujayAmberkar you can check out this.

https://github.com/autowarefoundation/AWSIM-Labs/blob/a99f67e1261df08d405de16883d8e000a1140485/Assets/AWSIM/Scripts/Sensors/Gnss/GnssSensor.cs#L73

I'm not sure if it does anything else with the coordinate values.

xmfcx commented 3 weeks ago

Message should be added as a custom message:

SujayAmberkar commented 2 weeks ago

@mozhoku I want to create a new custom message but I'm unsure if it'll cause any problems. And you're working on an issue of replacing older messages with new ones so I wanted to know what I should take care of while creating a new custom message. By reading that issue I could only understand that it's something related to the change of names.

mozhoku commented 1 week ago

@SujayAmberkar if you are adding a new custom message it shouldn't affect anything. I will be replacing the current message types used by the simulation so that it can communicate with the main autoware_universe branch after the msg changes. For example: autoware_auto_perception_msgs => autoware_perception_msg.