Skip to content

Commit

Permalink
Merge pull request #1366 from knorth55/develop/pr2
Browse files Browse the repository at this point in the history
[WIP] Merge develop/pr2 branch
  • Loading branch information
k-okada authored Dec 5, 2023
2 parents 34e3ccb + 85a066f commit be41449
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
4 changes: 3 additions & 1 deletion detect_cans_in_fridge_201202/launch/startup.launch
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<launch>
<arg name="start_rviz" default="false" />
<arg name="snap_map_icp" default="false" />
<arg name="wait_query" default="false" />
<arg name="execute" default="false" />
<arg name="DEMOTYPE" default="map" />
Expand All @@ -16,7 +17,8 @@
if="$(arg start_rviz)" />

<!-- ICP matching between map and base scan -->
<node pkg="snap_map_icp" type="snap_map_icp" name="tum_SnapMapICP"
<node if="$(arg snap_map_icp)"
pkg="snap_map_icp" type="snap_map_icp" name="tum_SnapMapICP"
output="screen" machine="c2">
<param name="age_threshold" value="2.0"/>
<param name="icp_inlier_threshold" value="0.78" />
Expand Down
18 changes: 9 additions & 9 deletions rwt_teleop/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ <h1><span class="glyphicon glyphicon-star"></span>rwt_teleop <small>robotwebtool

</div>

<div id="debug-text-area1">text1</div>
<div id="debug-text-area2">text2</div>
<div id="debug-text-area3">text3</div>
<div id="debug-text-area5">text5</div>
<div id="connecting-user-info">connecting-user-info-default-text</div>
<div id="net-tx-info">net-tx-info-default-text</div>
<div id="net-rx-info">net-rx-info-default-text</div>
<div id="net-delay-info">net-delay-info-default-text</div>
<h1><div id="debug-text-area6">Your Mic is OFF</div></h1>
<div id="mousemove-info">mousemove not published</div>
<div id="screenpoint-info">screenpoint not published</div>
<div id="outputpoint-info">outputpoint not published</div>
<div id="audio-info">audio not published</div>
<div id="connecting-user-info">connecting-user-info-default-text</div>
<div id="net-tx-info">net-tx-info-default-text</div>
<div id="net-rx-info">net-rx-info-default-text</div>
<div id="net-delay-info">net-delay-info-default-text</div>
<h1><div id="mic-info">Your Mic is OFF</div></h1>
</div>

<script type="text/javascript" src="/rwt_utils_3rdparty/jquery.min.js"></script>
Expand Down
18 changes: 9 additions & 9 deletions rwt_teleop/www/js/rwt_teleop_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ $(function() {
messageType : 'geometry_msgs/PointStamped'
});
mousemove_pub.publish(point);
document.getElementById("debug-text-area1").innerText = topic_name + " : " + imageX.toFixed(1) +", "+ imageY.toFixed(1);
document.getElementById("mousemove-info").innerText = topic_name + " : " + imageX.toFixed(1) +", "+ imageY.toFixed(1);
});

///// mouse click
Expand All @@ -247,7 +247,7 @@ $(function() {
messageType : 'geometry_msgs/PointStamped'
});
screenpoint_pub.publish(point);
document.getElementById("debug-text-area2").innerText = topic_name + " : " + imageX.toFixed(1) +", "+ imageY.toFixed(1);
document.getElementById("screenpoint-info").innerText = topic_name + " : " + imageX.toFixed(1) +", "+ imageY.toFixed(1);
});

///// 3D point
Expand All @@ -257,7 +257,7 @@ $(function() {
messageType : 'geometry_msgs/PointStamped'
});
listener1.subscribe(message => {
document.getElementById("debug-text-area3").innerText =
document.getElementById("output-info").innerText =
listener1.name + " = "+ message.point.x +", "+ message.point.y +", "+ message.point.z +"\n\n";
});

Expand Down Expand Up @@ -285,7 +285,7 @@ $(function() {

// save audio data
const onAudioProcess = function (e) {
document.getElementById("debug-text-area6").innerText = "Your Mic is ON ("+ audio_pub.name +")";
document.getElementById("mic-info").innerText = "Your Mic is ON ("+ audio_pub.name +")";
const input = e.inputBuffer.getChannelData(0);
const dataview = Float32ArrayTo16BitPCM(input);
const base64String = btoa(String.fromCharCode(...new Uint8Array(dataview.buffer)));
Expand All @@ -294,7 +294,7 @@ $(function() {

// getusermedia
const handleSuccess = function (stream) {
document.getElementById("debug-text-area6").innerText = "navigator.mediaDevices.getUserMedia() success";
document.getElementById("mic-info").innerText = "navigator.mediaDevices.getUserMedia() success";
let audioContext = new AudioContext({
latencyHint: 'interactive',
sampleRate: 16000,
Expand All @@ -312,12 +312,12 @@ $(function() {
navigator.mediaDevices.getUserMedia({ audio: true, video: false })
.then(handleSuccess)
.catch(function(err){
document.getElementById("debug-text-area6").innerText = "Cannot get Mic device";
document.getElementById("mic-info").innerText = "Cannot get Mic device";
console.log('getUserMedia fail');
});
}else{
console.log('navigator.mediaDevices not found');
document.getElementById("debug-text-area6").innerText = "navigator.mediaDevices not found";
document.getElementById("mic-info").innerText = "navigator.mediaDevices not found";
}

///// gazebo reset
Expand Down Expand Up @@ -395,7 +395,7 @@ $(function() {
current_image_info.width = message.width;
current_image_info.height = message.height;
current_image_info.frame_id = message.header.frame_id;
document.getElementById("debug-text-area3").innerText = current_image_info.topic + " (" + current_image_info.frame_id + "): "+ current_image_info.width +" x "+ current_image_info.height;
document.getElementById("outputpoint-info").innerText = current_image_info.topic + " (" + current_image_info.frame_id + "): "+ current_image_info.width +" x "+ current_image_info.height;
// after receiving first image topic, set up correct aspect ratio mjpeg_canvas
if(!mjpeg_canvas){
const div_width = $("#canvas-area").width();
Expand Down Expand Up @@ -437,7 +437,7 @@ $(function() {
messageType : 'audio_common_msgs/AudioData'
});
audio_sub.subscribe(message => {
document.getElementById("debug-text-area5").innerText = audio_sub.name + " = "+ message.data +"\n\n";
document.getElementById("audio-info").innerText = audio_sub.name + " = "+ message.data +"\n\n";
base64 = message.data;
B=(f,b=4)=>String.fromCodePoint.apply(this, Array(b).fill().map((v,i)=>(f>>i*8)&255))
D=f=>B(f,2)
Expand Down

0 comments on commit be41449

Please sign in to comment.