Error visualizing goal pose

Hi,

I’m following these instructions to visualize the results of a real robot job submission.
Everything is working fine except when I try to visualize the goal pose.

I’m using the following command:

./rrc2021_latest.sif ros2 run trifinger_object_tracking tricamera_log_viewer output/camera_data.dat -g output/goal.json

I downloaded all the data from the submission into an output/ folder. The error is:


Traceback (most recent call last):
  File "/opt/blmc_ei/install/trifinger_object_tracking/lib/trifinger_object_tracking/tricamera_log_viewer", line 251, in <module>
    main()
  File "/opt/blmc_ei/install/trifinger_object_tracking/lib/trifinger_object_tracking/tricamera_log_viewer", line 101, in main
    goal_pose.position = goal_dict["goal"]["position"]
TypeError: list indices must be integers or slices, not str

The goal.json file appears normal:

{
    "goal": [
        [
            0,
            [
                0.037180696226827376,
                -0.07563564340640104,
                0.07574403539166547
            ]
        ],
        [
            30000,
            [
                0.055866856498078994,
                0.1029862129283731,
                0.0530875534750468
            ]
        ],
        [
            40000,
            [
                -0.04348807633426177,
                0.03601489086345622,
                0.0509916540852495
            ]
        ],
        [
            50000,
            [
                -0.03584604001994493,
                0.07359444767371949,
                0.03675783918070111
            ]
        ],
        [
            60000,
            [
                0.03879464883385942,
                0.08150439792819619,
                0.06163954949127269
            ]
        ],
        [
            70000,
            [
                0.08095838408954448,
                0.07819069728407824,
                0.07303242474493052
            ]
        ],
        [
            80000,
            [
                0.05212079441653082,
                -0.015919639870047905,
                0.09550357143952001
            ]
        ],
        [
            90000,
            [
                0.00428656894698071,
                -0.10879027577364246,
                0.061835441857041054
            ]
        ],
        [
            100000,
            [
                0.13057337928082036,
                -0.0025528502223740868,
                0.037502889284953045
            ]
        ],
        [
            110000,
            [
                -0.11797998565648457,
                0.04851692268886624,
                0.0482338523995211
            ]
        ]
    ]
}

Oh, I’m sorry, looks like I missed this functionality when adapting things to this year’s task. I’m working on a fix.

It is a bit more complicated than I first thought as camera_data.dat alone does not contain the time step information needed to update the goal. So I probably won’t fix this in tricamera_log_viewer as it is out of scope for this script but instead I uploaded an extended version as GitHub Gist. You can simply download it and run it using the Singularity image.

It also needs the robot_data.dat as input to get the necessary time information, apart from this it behaves mostly the same as the original script.
Usage example:

./rrc2021_latest.sif python3 trifinger_platform_log_viewer.py output/robot_data.dat output/camera_data.dat -g output/goal.json

vid

Super that appears to be working for me, thanks!!