Skip to content

How to add walker and control it in ROS2 native #9314

@HMX2013

Description

@HMX2013

Setup
Describe the setup you are using to run CARLA along with its version:

  • CARLA version: 0.9.16
  • Platform: Ubuntu 22.04
  • Python version: 3.10
  • GPU: 3060
  • GPU Drivers: 580.82.07

Describe the bug
Hello, I want to add a walker and a vehicle when using ROS 2 native in Carla 0.9.16
When using the ROS bridge, I can do this in the following way.
{
"objects":
[
{
"type": "sensor.pseudo.actor_list",
"id": "actor_list"
},
{
"type": "walker.pedestrian.0002",
"id": "walker_run",
"spawn_point": {"x": -112.7, "y": -83.8, "z": 0.2, "roll": 0.0, "pitch": 0.0, "yaw": 111.0},
"sensors":
[
{
"type": "sensor.pseudo.odom",
"id": "odometry"
},
{
"type": "sensor.pseudo.tf",
"id": "tf"
}
]
},
{
"type": "vehicle.rgsv1.v1",
"id": "ego_vehicle",
"spawn_point": {"x": -110.0, "y": -97.4, "z": 0.3, "roll": 0.0, "pitch": 0.0, "yaw": 111.0},
"sensors":
[
{
"type": "sensor.pseudo.tf",
"id": "tf"
},
{
"type": "sensor.pseudo.odom",
"id": "odometry"
},
{
"type": "actor.pseudo.control",
"id": "control"
}
]
}
]
}

But in the new ROS 2 native, I don't know how to modify the stack.json. It seems that I can only add one object.
I want to add one vehicle and one walker in the simulation with ROS2.

Steps to reproduce
Explain the steps needed to reproduce the issue.

Expected behavior
I want to add a walker and a vehicle in the simulation with ROS2. I can control the walker's movement through the ROS2 topic.

Logs
Paste the server and client logs. Server ones can be found at:

  • Unreal Engine 4: Unreal/CarlaUE4/Saved/Logs
  • Unreal Engine 5: Unreal/CarlaUnreal/Saved/Logs

Scripts
Add any scripts relevant for the reproducibility of the error.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions