Skip to main content

Artefacts Toolkit (Charts)

Please consider this as a pre-release package, and thus subject to large, and breaking, changes prior to v1

A part of the Artefacts Toolkit, this package contains helpers to be used when creating charts from test data

Primarily designed to be used with Artefacts, the package can also be used standalone.

Usage

  • Single plot:
from artefacts_toolkit_chart import make_chart

make_chart(
    filepath,
    topic_x,
    topic_y,
    field_unit=None,
    output_dir="output",
    chart_name="chart",
    file_type="rosbag",
)
  • (HTML plot) Multiple plots for 1 axis (i.e: different critics vs time)
chart = make_chart(
        rosbag_filepath,
        ["/critics_cost/ConstraintCritic.data", "/critics_cost/GoalAngleCritic.data", "/critics_cost/GoalCritic.data", "/critics_cost/ObstaclesCritic.data", "/critics_cost/CostCritic.data", "/critics_cost/PathAlignCritic.data", "/critics_cost/PathAngleCritic.data", "/critics_cost/PathFollowCritic.data", "/critics_cost/PreferForwardCritic.data", "/critics_cost/TwirlingCritic.data", "/critics_cost/VelocityDeadbandCritic.data"],
        "time",
        x_axis_name="time",
        y_axis_name="critics",
        field_unit=None,
        chart_name="Critics vs Time",
    )
  • (HTML plot) Multiple plots for 2 axes (i.e: different trajectories on x-y coordinates):
chart = make_chart(
        rosbag_filepath,
        ["/odom.pose.pose.position.x", "/gt_odom.pose.pose.position.x"],
        ["/odom.pose.pose.position.y", "/gt_odom.pose.pose.position.y"],
        field_unit='m',
        chart_name="gt vs odom positions",
    )

Note: Currently charts can only be created from rosbags

Takes a file and creates a chart on the provided two topics. "time" can also be used as topic_x or topic_y if desired. An html chart will be created and saved to the output_dir.

Plotting time when using rosbags

  • Please note that not all ROS topics contain header timestamps. If no header is present, make_chart will use the rosbag’s own timestamps, which may cause timing inaccuracies if the rosbag was recorded or played back at non-real-time speeds.

Notes:

The Artefacts Toolkit also contains a bag_recorder helper to assist you if you require help in setting up a rosbag recording for your tests.

from artefacts_toolkit_rosbag.rosbag import get_bag_recorder
  • When using in a virtual environment, you may need to add your site packages to PYTHONPATH
export PYTHONPATH=$PYTHONPATH:/<your_workspace>/venv/lib/python3.10/site-packages

Metadata

Release files for artefacts-toolkit-chart 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for artefacts-toolkit-chart 1.0.0
File Interpreter ABI Platform
artefacts_toolkit_chart-1.0.0-py3-none-any.whl Python 3 none any Details

Release files / artefacts_toolkit_chart-1.0.0-py3-none-any.whl

Download URL artefacts_toolkit_chart-1.0.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6cf0a5e6d8e42a0ac604ff030cb9b4816615383802ab0ec66278502f9aba0b4
BLAKE2b-256 checksum
How to use checksums
1d9d6dd147c4a557ae5d384b74a0bab5bfccf930f568bc610a88afb62f32087f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page