Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/VincentYu68/SymmetryCurriculumLocomotion
19 June 2024, 13:49:32 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • fa936fa
  • /
  • baselines
  • /
  • examine_skel.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:ac5efa1ea4997b98ef308bea3e5e5d47fa5071fb
origin badgedirectory badge Iframe embedding
swh:1:dir:807aa53e6b969289a57f1450acca35121f9a2220
origin badgerevision badge
swh:1:rev:b50478f8eca673730e3ce1a5441b1948b31a5187
origin badgesnapshot badge
swh:1:snp:5c020c91964c1d071f5051f08dcb7bf5f940ca20
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: b50478f8eca673730e3ce1a5441b1948b31a5187 authored by Wenhao Yu on 31 January 2019, 22:41:28 UTC
update readme
Tip revision: b50478f
examine_skel.py
__author__ = 'yuwenhao'

import gym
import sys, os, time

import joblib
import numpy as np

import matplotlib.pyplot as plt
from gym import wrappers

np.random.seed(15)

if __name__ == '__main__':
    if len(sys.argv) > 1:
        env = gym.make(sys.argv[1])
    else:
        env = gym.make('DartHumanWalker-v1')

    if hasattr(env.env, 'disableViewer'):
        env.env.disableViewer = False
        '''if hasattr(env.env, 'resample_MP'):
        env.env.resample_MP = False'''

    record = False
    if len(sys.argv) > 3:
        record = int(sys.argv[3]) == 1
    if record:
        env_wrapper = wrappers.Monitor(env, 'data/videos/', force=True)
    else:
        env_wrapper = env

    env.env.dart_world.set_gravity(np.zeros(3))

    q = env.env.robot_skeleton.q

    cur_dof = 0
    t_inc = 0.03
    cur_val = 0.5
    T = 0.0
    while True:
        if env.env.robot_skeleton.q_lower[cur_dof] < -100:
            lval = -1.0
        else:
            lval = env.env.robot_skeleton.q_lower[cur_dof]
        if env.env.robot_skeleton.q_upper[cur_dof] > 100:
            hval = 1.0
        else:
            hval = env.env.robot_skeleton.q_upper[cur_dof]
        qval = (hval - lval) * cur_val + lval

        cur_q = env.env.robot_skeleton.q
        cur_q[cur_dof] = qval
        env.env.robot_skeleton.q = cur_q

        cur_val += t_inc
        if cur_val >= 1.0 or cur_val <= -0.0:
            t_inc *= -1

        T += np.abs(t_inc)
        if T > 2.0:
            cur_dof += 1
            T = 0.0
            if cur_dof >= len(cur_q):
                cur_dof = 0
            env.reset()
        env.render()

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top