lethal233 / ms-thesis-project

GNU General Public License v3.0
1 stars 0 forks source link

Adding a node subscribing the trajectory points output #1

Closed lethal233 closed 3 months ago

lethal233 commented 7 months ago

References:

Procedures:

lethal233 commented 7 months ago

In Autoware Docker, remember to source install/setup.bash

Inspect ROS topics:

ros2 topic info <topic_name>

If you want to list all publishers and subscribers in detail, use:

ros2 topic info --v <topic_name>
lethal233 commented 7 months ago

To see the information published in the topic:

  1. Start the Autoware (planning, or something else), e.g.,
    ros2 launch scenario_test_runner scenario_test_runner.launch.py \
    architecture_type:=awf/universe \
    record:=false \
    scenario:='$(find-pkg-share scenario_test_runner)/scenario/sample.yaml' \
    sensor_model:=sample_sensor_kit \
    vehicle_model:=sample_vehicle
  2. Open another terminal, step into the docker, source the bash, and type ros2 topic echo <topic_name>
  3. You will see data like this (taking ros2 topic ech/planning/scenario_planning/trajectory for example):
    - time_from_start:
    sec: 0
    nanosec: 0
    pose:
    position:
      x: 3790.567281193354
      y: 73810.59814503009
      z: -2.7922909968937697
    orientation:
      x: 0.002396582037636447
      y: -0.009927773817067928
      z: 0.23464891275807337
      w: 0.9720265343307394
    longitudinal_velocity_mps: 0.0
    lateral_velocity_mps: 0.0
    acceleration_mps2: 0.10000000149011612
    heading_rate_rps: 0.0
    front_wheel_angle_rad: 0.0
    rear_wheel_angle_rad: 0.0
lethal233 commented 7 months ago
sora@71722e36d87c:~/Desktop/shilonl/autoware$ ros2 topic echo /planning/hazard_lights_cmd
---
stamp:
  sec: 1706048508
  nanosec: 258304479
command: 1
---
stamp:
  sec: 1706048508
  nanosec: 359006121
command: 1
---
stamp:
  sec: 1706048508
  nanosec: 459840986
command: 1
---
stamp:
  sec: 1706048508
  nanosec: 561205923
command: 1
---
stamp:
  sec: 1706048508
  nanosec: 660190346
command: 1
---
stamp:
  sec: 1706048508
  nanosec: 759686456
command: 1