Closed LuckyCZD closed 1 week ago
In your custom environment you should define a def _initialize_episode
function which upon env.reset will initialize all objects accordingly including the robot. In this function you can do something like self.agent.robot.set_qpos(self.agent.keyframes["rest"])
.
Thank you very much, it's worked.
I followed the tutorial to load my custom robotic arm (panda's end effector was replaced with a dexterous hand) into the custom environment. The results I got by setting the keyframe 'rest' and running test.py were normal(picture below), but when I loaded the robotic arm into a custom environment, the initial position of the robotic arm was all joints = 0. How can I set the initial position of the robot arm in the custom environment to the keyframe position?