Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue of scripted_policy #27

Open
QNXLQ opened this issue May 11, 2024 · 0 comments
Open

issue of scripted_policy #27

QNXLQ opened this issue May 11, 2024 · 0 comments

Comments

@QNXLQ
Copy link

QNXLQ commented May 11, 2024

Thanks for your working.

Nearly, I'm try to modify the function generation_trajectory of class PckAndTransferPolicy in the file scripted_policy.py, increase the timesteps and the description "episode_len" of mission in the constante.py, for example, add waypoints in the trajectory and increase the total timesteps to 800.

But in the simulation, the robot and the env always be reseted to the initial at the timestep 400, and at the ts.reward will return to None, I don't know why, is any other file need to be modified?

By the way, if the new total timesteps is smaller, like 300, the simulation will be normal.

Here are where I modified:

In the scripted_policy.py:

class PickAndTransferPolicy(BasePolicy):
     def generate_trajectory(self, ts_first):
          ......
          ......
          self.left_trajectory = {
          {"t": 0, "xyz".........},
          {"t": 175, "xyz".........},
          {"t": 211, "xyz".........},
          {"t": 285, "xyz".........},
          {"t": 295, "xyz".........},
          {"t": 325, "xyz".........},
          {"t": 350, "xyz".........},
          {"t": 400, "xyz".........},
          {"t": 470, "xyz".........},
          {"t": 530, "xyz".........},
          {"t": 600, "xyz".........},
          {"t": 720, "xyz".........},
          {"t": 800, "xyz".........},
          }

          self.right_trajectory = {
          {"t": 0, "xyz".........},
          {"t": 175, "xyz".........},
          {"t": 211, "xyz".........},
          {"t": 285, "xyz".........},
          {"t": 295, "xyz".........},
          {"t": 325, "xyz".........},
          {"t": 350, "xyz".........},
          {"t": 400, "xyz".........},
          {"t": 470, "xyz".........},
          {"t": 530, "xyz".........},
          {"t": 600, "xyz".........},
          {"t": 720, "xyz".........},
          {"t": 800, "xyz".........},
          }

And in the In the constante.py:

SIM_TASK_CONFIGS = {
    'task_name':{
    'dataset_dir': ...,
    'num_episodes':50,
    'episode_len':800,
    'camera_names': 'cam',
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant