Coder Social home page Coder Social logo

fangxiaoshen / ros_pytorch_rl Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 9.0 130 KB

在turtlebot3,pytorch上使用DQN,DDPG,PPO,SAC算法,在gazebo上实现仿真。Use DQN, DDPG, PPO, SAC algorithm on turtlebot3, pytorch on turtlebot3, pytorch, and realize simulation on gazebo. Use DQN, DDPG, PPO, SAC algorithm to realize simulation on gazebo.

License: Apache License 2.0

Python 100.00%

ros_pytorch_rl's People

Contributors

fangxiaoshen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ros_pytorch_rl's Issues

缺少QDN的文件夹

Hi,大佬
@Crawford-fang
非常感谢大佬可以公开自己的开源代码,我对于深度强化学习训练机器人非常感兴趣,我下载了您的代码,但是运行出现错误,如下:
/home/he/miniconda3/envs/rostorch/bin/python3.7 /home/he/turtlebot_ws/src/ROS_pytorch_RL/DQN/DQN2.py Traceback (most recent call last): File "/home/he/turtlebot_ws/src/ROS_pytorch_RL/DQN/DQN2.py", line 147, in <module> dqn = DQN() # 令dqn=DQN类 File "/home/he/turtlebot_ws/src/ROS_pytorch_RL/DQN/DQN2.py", line 78, in __init__ checkpoint = torch.load("/home/ffd/QDN/model/" + str(self.load_ep) + "a.pt") File "/home/he/miniconda3/envs/rostorch/lib/python3.7/site-packages/torch/serialization.py", line 594, in load with _open_file_like(f, 'rb') as opened_file: File "/home/he/miniconda3/envs/rostorch/lib/python3.7/site-packages/torch/serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/he/miniconda3/envs/rostorch/lib/python3.7/site-packages/torch/serialization.py", line 211, in __init__ super(_open_file, self).__init__(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: '/home/ffd/QDN/model/780a.pt'

我个人觉得是缺少QDN这个文件夹,如果大佬看到了,希望可以上传自己的QDN文件夹。或者可以帮助一下我解决一下问题。
希望可以尽快收到您的回复,非常感谢!

关于SAC的一些疑问

大佬您好,非常感谢你的开源,
想请问一下在SAC这个文件当中有sac.py和sac_stage_1.py,小弟发现功能大致上相同,
除了在sac_stage_1.py中引入了Mish作为激活函数外,是否还有其他不同之处呢?
另外还想请问一下大佬对于SAC而言Mish这个激活函数对于网络是否有带来帮助?

非常感谢你的帮助!

智能体的状态信息维度问题

您好,非常感谢您的贡献。在学习您的代码过程中我有几个问题,希望能得到解答:

  1. 智能体的状态维度,通过分析laser_scan的信息维度应该是644,为什么DQN2.py 第24行写的28呢?这会影响后面深度网络的计算。
    N_STATES = 28 # 杆子状态个数 (4个)
  2. 状态信息处理:
    for i in range(len(scan.ranges)):
    if scan.ranges[i] == float('Inf'):
    scan_range.append(3.5)
    elif np.isnan(scan.ranges[i]):
    scan_range.append(0) #
    else:
    scan_range.append(scan.ranges[i])
    scan.ranges里面除了具体数值不会出现‘Inf’只会出现‘nan’值,经过分析‘nan’的意思应该是这个激光距离为无效(也就是无限远)。您的意思应该是‘nan’值表示激光距离为零,但好像不是这样的。
  3. 奖励设置
    ((round(yaw_reward[action] * 5, 2)) * distance_rate)
    这部分奖励的表达的意思不明白,希望能得到您的解答。感激不尽!

奖励函数问题

您好,请问DQN里面的将里设置可以和SAC里面的奖励设置一样吗?

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.