Submission script error

File "/opt/blmc_ei/install/trifinger_simulation/lib/python3.8/site-packages/
trifinger_simulation/trifinger_platform.py", line 396, in store_action_log    
    pickle.dump(self._action_log, fh)                                         
TypeError: cannot pickle 'robot_interfaces.py_trifinger_types.Action' object  
Command '['python3', '/ws/src/pkg/evaluate_policy.py', '[[0, [-0.0420254279664
0919, 0.12745132751922883, 0.05146040944096057]], [30000, [0.1247057267925297,
 0.030710089539284648, 0.07768493800053149]], [40000, [0.025451869384368844, -
0.11855845504572926, 0.03788127084353886]], [50000, [-0.041871675326094565, -0
.050006483592827375, 0.07658464158928123]], [60000, [-0.010881578534762362, 0.
021273898176694003, 0.08587971093366326]], [70000, [0.031651091454415387, -0.1
0748855709137238, 0.04190160067935505]], [80000, [-0.08356256545722894, -0.023
416302067712964, 0.054432678031603045]], [90000, [-0.05128553477290959, -0.034
92339299221874, 0.06641628827578913]], [100000, [0.10776936934815412, 0.036996
58393551795, 0.06807986395528262]], [110000, [-0.017540812682005934, 0.1266917
572972727, 0.09187193025585436]]]', '/ws/output/action_log_00.p']' returned no
n-zero exit status 1.

Hi,
I seem to be getting this error when the rrc_prestage_evaluation gets done running my code and generates the reward. Any idea what I need to be doing here.

Any advice here will be appreciated. Thanks a lot !!

It seems you are using the Action type from robot_interfaces instead of the one of trifinger_simulation. I think the evaluation of the pre-stage will not work with the former. The easiest fix would probably be to convert it just before passing the action to TriFingerPlatform.append_desired_action. The following should probably work (untested, though, so you should verify it):

sim_action = trifinger_simulation.action.Action(
    action.torque, action.position, action.position_kp, action.position_kd
)

Are you sure the actions have attributes torque and position, or is it more like dictionary keys

In both robot_interfaces.py_trifinger_types.Action and trifinger_simulation.action.Action they are attributes. In the gym environments some other types might be used, though, which are converted before they are sent to the robot. In our example package this happens here, I think something similar is done in the benchmark-rrc code.

Ok I understand exactly where the problem is. Thanks for your reply.