miguelriemoliveira / simpleBot

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Problem with visualizationFunction #4

Open Analtino2021 opened 2 years ago

Analtino2021 commented 2 years ago

Good morning teacher @miguelriemoliveira : I'm having an unknown problem when I call the preview function:

https://github.com/lardemua/atom/blob/c73317c00baef4ae00209ef703485cfbb094c628/atom_calibration/src/atom_calibration/calibration/visualization.py#L544-L555

This is my code:

https://github.com/manuelgitgomes/atom/blob/4b9ffb4707e88ebf52c948fbf0f6dcfbb6e45428/atom_calibration/scripts/data_set_play_bag.py#L90-L97

When I run the code with:

./data_set_play_bag.py --json_file /home/analtino/catkin_ws/src/simpleBot/data_sets/teste1/dataset.json -csf 'lambda x: int(x)==0' -ssf 'lambda name: name=="left_camera"' -uic -ajf -ipg

The result is:


Skipped loading images and point clouds for collections: [].
Deleted collections: [] because of the -csf flag.
Deleted collections: []: at least one detection by a camera should be present.
After filtering, will use 1 collections: ['0']
Deleted sensors: ['lidar3d']
Loaded dataset containing 1 sensors and 1 collections.
Selected collection key is 0
Parsing description file /home/analtino/catkin_ws/src/simpleBot/simplebot_description/urdf/simplebot.urdf.xacro
Executing command: xacro /home/analtino/catkin_ws/src/simpleBot/simplebot_description/urdf/simplebot.urdf.xacro -o /tmp/description.urdf
base_footprint to base_footprint:
Collection 0: 
base_footprint to base_link:
Collection 0: 
base_footprint to wheel_left_link:
Collection 0: 
base_footprint to wheel_right_link:
Collection 0: 
base_footprint to caster_back_right_link:
Collection 0: 
base_footprint to caster_back_left_link:
Collection 0: 
base_footprint to imu_link:
Collection 0: 
base_footprint to platform_support_leg1_link:
Collection 0: 
base_footprint to platform_support_leg2_link:
Collection 0: 
base_footprint to platform_support_leg3_link:
Collection 0: 
base_footprint to platform_support_leg4_link:
Collection 0: 
base_footprint to front_left_camera_support_link:
Collection 0: 
base_footprint to front_left_camera_link:
Collection 0: 
base_footprint to front_left_camera_rgb_frame:
Collection 0: 
base_footprint to front_left_camera_rgb_optical_frame:
Collection 0: 
base_footprint to front_left_camera_depth_frame:
Collection 0: 
base_footprint to front_left_camera_depth_optical_frame:
Collection 0: 
base_footprint to left_base_scan:
Collection 0: 
base_footprint to right_base_scan:
Collection 0: 
base_footprint to lidar3d_base_link:
Collection 0: 
base_footprint to lidar3d:
Collection 0: 
immovable links are: ['base_footprint', 'base_link', 'wheel_left_link', 'wheel_right_link', 'caster_back_right_link', 'caster_back_left_link', 'imu_link', 'platform_support_leg1_link', 'platform_support_leg2_link', 'platform_support_leg3_link', 'platform_support_leg4_link', 'front_left_camera_support_link', 'front_left_camera_link', 'front_left_camera_rgb_frame', 'front_left_camera_rgb_optical_frame', 'front_left_camera_depth_frame', 'front_left_camera_depth_optical_frame', 'left_base_scan', 'right_base_scan', 'lidar3d_base_link', 'lidar3d']
movable links are: []
Robot is assumed to have all joints fixed.
Robot has all joints fixed. Will render only collection 0
Traceback (most recent call last):
  File "./data_set_play_bag.py", line 102, in <module>
    main()
  File "./data_set_play_bag.py", line 96, in main
    visualizationFunction(models)
  File "/home/analtino/catkin_ws/src/atom/atom_calibration/src/atom_calibration/calibration/visualization.py", line 545, in visualizationFunction
    for transform_key, transform in collection[generateName('transforms', suffix='ini')].items():
KeyError: 'transforms_ini'
miguelriemoliveira commented 2 years ago

Hi @Analtino2021 ,

The issue looks great! Congratulations!

The error I think is related with the fact that you must have this portion of code in your script:

https://github.com/lardemua/atom/blob/c73317c00baef4ae00209ef703485cfbb094c628/atom_calibration/scripts/calibrate#L127-L135

Tell me if it solves the problem.

Analtino2021 commented 2 years ago

Thank you teacher, Solves the problem

Analtino2021 commented 2 years ago

Thank you teacher, Solves the problem