Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update record classes for CoMLOPs format #163

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ktro2828
Copy link
Contributor

@ktro2828 ktro2828 commented Oct 29, 2024

Description

This PR includes following changes:

  1. Update fields of ego_pose and store data recorded by INS
  2. Add support of generating of vehicle_state.json

Configuration updates

As described in config/convert_comlops_rosbag2_to_non_annotated_t4_sample.yaml, please edit fields in conversion as follows:

conversion:
  ...
  with_ins: true            # whether to use INS messages as a ego state instead of `/tf`
  with_vehicle_status: true # whether to generate `vehicle_state.json`

EgoPose

  • If with_ins=True the converter initializes INSHandler and load ego poses using odometry, imu and nav_sat_fix instead of /tf message.
    • INSHandler retrieves an ego state interpolated by linear at the corresponding timestamp.

The sample output of ego_pose.json is as below:

    {
        "token": "082008187ebfca8a25c9ce8a500fb2c3",
        "translation": [
            -6.2490851223989035,
            -3.0805003909970616,
            -2.4697036630417264
        ],
        "rotation": [
            4.329780281177467e-17,
            0.7071067811865476,
            0.7071067811865475,
            4.329780281177466e-17
        ],
        "timestamp": 1724306789117423,
        "twist": [
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0
        ],
        "acceleration": [
            0.11715737026959112,
            -0.9582391259005323,
            -9.723479226352445
        ],
        "geocoordinate": [
            35.624468375999996,
            139.74287536399999,
            61.35459899902344
        ]
    },

VechileState

  • If with_vechile_status=True, the converter initializes VehicleStatusHandler and load certain vehicle states.
    • Note that, currently, any records in vehicle_state.json are not associated with the other records such as sample.json.

The sample output of vehicle_state.json is as below:

    {
        "token": "269572c280bd5cf9630ca542e6a60185",
        "timestamp": 1724306784277396,
        "accel_pedal": 0.0,
        "brake_pedal": 1.0,
        "steer_pedal": 0.6063521901837905,
        "steering_tire_angle": 0.6063522100448608,
        "steering_wheel_angle": 9.291000366210938,
        "shift_state": "PARK",
        "indicators": {
            "left": "off",
            "right": "on",
            "hazard": "off"
        },
        "additional_info": {
            "speed": 0.0
        }
    },

How to review

How to test

test data

test command

  1. Setting up the environment
# Added `ros-${ROS_DISTRO}-tf-transformations`
sudo apt install -y ros-${ROS_DISTRO}-sensor-msgs-py ros-${ROS_DISTRO}-rosbag2-storage-mcap ros-${ROS_DISTRO}-radar-msgs ros-${ROS_DISTRO}-tf-transformations

mkdir src -p && vcs import src < build_depends.repos

# Added `oxts_msgs` and `vehicle_msgs`
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to autoware_auto_perception_msgs autoware_perception_msgs tier4_perception_msgs oxts_msgs vehicle_msgs
source ./install/setup.bash
  1. After editing input_base in the config/convert_comlops_rosbag2_to_non_annotated_t4_sample.yaml, run following command:
$ python3 -m perception_dataset.convert --config config/convert_comlops_rosbag2_to_non_annotated_t4_sample.yaml

Reference

Notes for reviewer

@ktro2828 ktro2828 requested a review from miursh October 29, 2024 15:15
@ktro2828 ktro2828 force-pushed the feat/comlops/rosbag-conversion branch from 43fcfde to 6d9648e Compare October 29, 2024 15:27
Signed-off-by: ktro2828 <[email protected]>
@ktro2828
Copy link
Contributor Author

ktro2828 commented Nov 12, 2024

TODO List

- [ ] Convert the unit of angles in INS from degree to rad

@miursh
Copy link
Collaborator

miursh commented Nov 12, 2024

@ktro2828
About the INS unit, I will update the driver code. so there is no need to support unit conversion here.

@ktro2828
Copy link
Contributor Author

NOTE
Updates status in a093a78

  • For linear/angular velocity, use data in odometry message without any transformation
  • For acceleration, use data in imu message without any transformation
    • As future updates, it would be better to consider imu bias

@ktro2828
Copy link
Contributor Author

@miursh
Here is my script to check data: TIER IV INTERNAL LINK

@ktro2828 ktro2828 force-pushed the feat/comlops/rosbag-conversion branch 5 times, most recently from b234e5f to 58510af Compare November 13, 2024 07:25
@ktro2828 ktro2828 force-pushed the feat/comlops/rosbag-conversion branch from 58510af to a79b5c3 Compare November 13, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants