File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed
Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,8 @@ <h1 style="margin: 0; margin-bottom: 5px;"><img src="./blob/logo.svg" style="wid
102102 < h3 style ="margin: 0; margin-bottom: 10px; "> Jonas Eschmann, Dario Albani, Giuseppe Loianno</ h3 >
103103 < a class ="fancy-button fancy-button-small " href =""> Paper on ArXiV</ a >
104104 < a class ="fancy-button fancy-button-small " href ="https://github.com/rl-tools/foundation-policy "> Code on Github</ a >
105- < div style ="margin: 10px; max-width: 900px; margin-left: auto; margin-right: auto; ">
106- < div style ="position: relative; width: 100%; height: 0; padding-bottom: 56.25%; /* 16:9 aspect ratio */ ">
107- < iframe src ="https://www.youtube.com/embed/PdRgxDDvUws?si=jToj556_kJDtVbhx " title ="YouTube video player " frameborder ="0 " allow ="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share " referrerpolicy ="strict-origin-when-cross-origin " allowfullscreen style ="position: absolute; top: 0; left: 0; width: 100%; height: 100%; "> </ iframe >
105+ < div id ="video-container " style ="margin: 10px; max-width: 900px; margin-left: auto; margin-right: auto; ">
106+ < div id ="video-container-inner " style ="position: relative; width: 100%; height: 0; padding-bottom: 56.25%; /* 16:9 aspect ratio */ ">
108107 </ div >
109108 </ div >
110109 < div style ="margin: 10px; ">
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class Policy{
7272 }
7373 get_observation ( state , obs ) {
7474 let vehicle_state = null
75- const full_observation = state . get_observation ( )
75+ const full_observation = Array . from ( state . get_observation ( ) )
7676 console . assert ( full_observation . length > 18 , "Observation is smaller than base observation" )
7777 const get_state = ( ) => {
7878 if ( vehicle_state === null ) {
@@ -132,7 +132,7 @@ class Policy{
132132 return states . map ( ( state , i ) => {
133133 state . observe ( )
134134 const observation_description = document . getElementById ( "observations" ) . observation
135- let input = math . matrix ( [ observation_description . split ( "." ) . map ( x => Array . from ( this . get_observation ( state , x ) ) ) . flat ( ) ] )
135+ let input = math . matrix ( [ observation_description . split ( "." ) . map ( x => this . get_observation ( state , x ) ) . flat ( ) ] )
136136 const reference = references [ i ]
137137 reference . forEach ( ( x , i ) => {
138138 const value_raw = input . _data [ 0 ] [ i ] - x ;
Original file line number Diff line number Diff line change @@ -119,10 +119,10 @@ export class L2F{
119119 }
120120 update_render_state ( ) {
121121 this . render_states = this . states . map ( state => { return {
122- "position" : state . get_position ( ) ,
123- "orientation" : state . get_orientation ( )
122+ "position" : Array . from ( state . get_position ( ) ) ,
123+ "orientation" : Array . from ( state . get_orientation ( ) )
124124 } } )
125- this . render_actions = this . states . map ( state => state . get_action ( ) )
125+ this . render_actions = this . states . map ( state => Array . from ( state . get_action ( ) ) )
126126
127127
128128 const combined_state = this . render_states . map ( ( state , i ) => {
Original file line number Diff line number Diff line change @@ -2,5 +2,11 @@ document.addEventListener("DOMContentLoaded", () => {
22 const urlParams = new URLSearchParams ( window . location . search )
33 if ( window . location . hostname === "raptor.rl.tools" || urlParams . get ( "raptor" ) === "true" ) {
44 document . getElementById ( "raptor-project-page" ) . style . display = "block" ;
5+ if ( urlParams . get ( "yt" ) !== "false" ) {
6+ document . getElementById ( "video-container-inner" ) . innerHTML = '<iframe src="https://www.youtube.com/embed/PdRgxDDvUws?si=jToj556_kJDtVbhx" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>' ;
7+ }
8+ else {
9+ document . getElementById ( "video-container" ) . style . display = "none" ;
10+ }
511 }
612} )
You can’t perform that action at this time.
0 commit comments