ARISE-Initiative / robomimic

robomimic: A Modular Framework for Robot Learning from Demonstration
MIT License
592 stars 181 forks source link

Problem when testing trained agent #152

Closed AaronCaoZJ closed 5 months ago

AaronCaoZJ commented 5 months ago

I am trying to learn imitation learning for robots, and I have tried to train an agent using _diffusionpolicy which was able to achieve a success rate of up to 0.96 when Rollout on the NutAssemblySquare task. I'm considering whether the agent has the ability to insert the nut into a target peg whose position has been changed, such as when I try to modify the coordinates of the peg in the pegs_arena.xml file.

In my practice, I move all the pegs to the left by some distance, however, from the trajectory during rollout, it seems that the robot still puts the nut into the original peg position without adapting to the change in the environment, which is supposed to be inconsistent with the effect of imitation learning.

I would like to know if it is reasonable for me to adjust the test environment in this way, is it the case that such a modification does not change the Obs? If there is a correct way, please guide me, thanks!

amandlek commented 5 months ago

This is likely because (1) the agent never saw any variation in peg location in the training data and (2) the peg location is not given to the agent as an observation. This is likely a better question for the robosuite issues page, but I would start by modifying the environment to include peg information as an observation - you can see an example here.