Code Monkey home page Code Monkey logo

Comments (2)

DerrickXuNu avatar DerrickXuNu commented on August 19, 2024

Thanks for using OpenCDA! The RL branch is not finished yet. We are still developing it, so there maybe some bugs.

from opencda.

flammingRaven avatar flammingRaven commented on August 19, 2024

Thanks for your reply, and I will wait for the final RL branch. For the last problem, I just add a line in rl_api.py, and the previous error does not show again.

rl_cfg.policy.other.replay_buffer.periodic_thruput_seconds = 60 # it may be the default value in ding, I am not sure.
replay_buffer = NaiveReplayBuffer(rl_cfg.policy.other.replay_buffer,
                                  tb_logger, exp_name=rl_cfg.exp_name)

but unfortunately I have encountered another problem:

Traceback (most recent call last):
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda.py", line 65, in <module>
    main()
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda.py", line 60, in main
    scenario_runner(opt, config_yaml)
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda/scenario_testing/single_rldqn_town06_carla.py", line 16, in run_scenario
    rl_train(opt, config_yaml)
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda/core/ml_libs/rl/rl_api.py", line 193, in rl_train
    policy_kwargs={'eps': eps})
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/ding/worker/collector/sample_serial_collector.py", line 246, in collect
    timesteps = self._env.step(actions)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/ding/envs/env_manager/base_env_manager.py", line 346, in step
    timesteps[env_id] = self._step(env_id, act)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/ding/envs/env_manager/base_env_manager.py", line 380, in _step
    raise runtime_error
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/ding/envs/env_manager/base_env_manager.py", line 369, in _step
    return step_fn()
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/ding/envs/env_manager/base_env_manager.py", line 56, in wrapper
    raise e
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/ding/envs/env_manager/base_env_manager.py", line 54, in wrapper
    return func(*args, **kwargs)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/ding/envs/env_manager/base_env_manager.py", line 364, in step_fn
    return self._envs[env_id].step(act)
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda/core/ml_libs/rl/envs/simple_carla_env_scenario_manager.py", line 527, in step
    control = self._hero_vehicle_manager.run_step()
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda/core/common/vehicle_manager.py", line 205, in run_step
    target_speed, target_pos = self.agent.run_rl_action_step()
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda/core/plan/rl_behavior_agent.py", line 408, in run_rl_action_step
    target_acc)        # a_end
  File "/home/ghz/PycharmProjects/OpenCDA-feature-reinforcement_learning/opencda/core/plan/rl_local_planner_behavior.py", line 158, in generate_path
    v_end, a_end, plan_time)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/mistgen/mist.py", line 297, in mist_2d_gen
    self.polys_x,self.polys_y = self.minimum_snap_2d(waypts,self.ts,v0,a0,ve,ae)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/mistgen/mist.py", line 234, in minimum_snap_2d
    polys_x = self.minimum_snap_single(waypts[0],ts,v0[0],a0[0],ve[0],ae[0])
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/mistgen/mist.py", line 148, in minimum_snap_single
    x = quadprog(Q_all,b_all,Aieq,bieq,Aeq,beq)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/mistgen/utils/cvxopt_qp.py", line 41, in quadprog
    sol = cvxopt.solvers.qp(P, q, L, k, Aeq, beq)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/cvxopt/coneprog.py", line 4485, in qp
    return coneqp(P, q, G, h, None, A,  b, initvals, kktsolver = kktsolver, options = options)
  File "/home/ghz/anaconda3/envs/opencda/lib/python3.7/site-packages/cvxopt/coneprog.py", line 2013, in coneqp
    raise ValueError("Rank(A) < p or Rank([P; A; G]) < n")
RuntimeError: Env 0 step has exceeded max retries(1), and the latest exception is: ValueError('Rank(A) < p or Rank([P; A; G]) < n')
ERROR: failed to destroy actor 281 : unable to destroy actor: not found 
WARNING: sensor object went out of the scope but the sensor is still alive in the simulation: Actor 279 (sensor.other.gnss) 
WARNING: sensor object went out of the scope but the sensor is still alive in the simulation: Actor 280 (sensor.other.imu) 
terminate called without an active exception

I would be very grateful If you could give me some guides. Thanks a lot!

from opencda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.