전체 글69 ROS Noetic : Server & Client 앞서서 ROS service를 활용해보았다. 이는 서버-클라이언트 구조와 흡사함을 알 수 있다. 이번에는 실제로 서버-클라이언트의 구조를 만들어본다. 일단은 앞서 만들었던 closed_loop의 turtle_controller를 이용하며 화면의 좌측에 있으면 붉은 색, 우측에 있으면 녹색의 자취를 나타내는 형태를 만들 것이다. 이전 코드를 가져와서 bold 처리된 줄들을 추가해준다. #!/usr/bin/env python3 import rospy from turtlesim.msg import Pose # output of turtlesim from geometry_msgs.msg import Twist # input for turtlesim class TurtleControl: def __init__(s.. 2022. 8. 11. Stanford CS234 Lecture 9 Stanford CS234: Reinforcement Learning | Winter 2019 | Lecture 9 Continuing discussion about gradient descent, recall that our goal is to converge ASAP to a local optima. We want our policy update to be a monotonic improvement. → guarantees to converge (emphirical) → we simply don’t want to get fired... Recall last time, we expressed gradient of value function as below this term is unbiased but .. 2022. 8. 11. Stanford CS234 Lecture 8 Stanford CS234: Reinforcement Learning | Winter 2019 | Lecture 8 Policy-Based Reinforcement Learning Recall last lecture → where we learned to find state-value(V) or state-action value(Q) for parameter w(or θ) and use such to build (hopefully)optimal policy(π) Today we’ll take that policy πθ as parameter πθ(s,a)=P[a|s;θ] our goal is to find a policy .. 2022. 8. 11. ROS Noetic : ROS service 이번에는 ROS service에 대해 알아본다. service는 node에서 사용할 수 있는 기능 정도로 보인다. rospy_tutorials 패키지에서 제공하는 예시를 보자. 위를 보면 add_two_ints_server 라는 실행파일을 작동시켰다. add_two_ints라는 service가 실행중이고 이 서버가 돌다가 rosservice call로 호출을 하여 a, b값을 주면 위의 서버에서 계산을 해서 출력해주는 것을 볼 수 있다. 이는 publish subscribe의 형태가 아니다! 노드도 저거 하나만 켜져있다. 위에서 도는 server가 말 그대로 서버의 역할을 하고 아래 터미널 창에서 rosservice call하는 부분이 클라이언트의 역할을 한다고 볼 수 있다. rossrv는 service.. 2022. 8. 10. ROS Noetic : Closed Loop system with Turtlesim 이번에는 한 node 안에 publisher와 subscriber가 모두 있는 closed loop system을 만들어본다. 역시나 tutlesim 이용할거다. 일단 한 방향으로 직진하는 모양으로 만들었다. 이전과 같이 scripts폴더 안에 turtle_controller.py를 생성한다. 점점 복잡해질 수 있다 판단하여 class 안에 집어넣어 버렸다. 따로 만들어줘도 상관은 없을 듯 하다. #!/usr/bin/env python3 import rospy from turtlesim.msg import Pose # output of turtlesim from geometry_msgs.msg import Twist # input for turtlesim class TurtleControl: def __.. 2022. 8. 9. Stanford CS234 Lecture 7 Stanford CS234: Reinforcement Learning | Winter 2019 | Lecture 7 Imitation Learning there are occasions where rewards are dense in time or each iteration is super expensive → autonomous driving kind of stuff So we summon an expert to demonstrate trajectories Our problem Setup we will talk about three methods below and their goal are... Behavoiral Cloning : learn directly from teacher’s policy In.. 2022. 8. 9. 이전 1 ··· 6 7 8 9 10 11 12 다음 반응형