now can choose which topics to bag in the control pannel
This commit is contained in:
3
backend/js/Node.js
Normal file
3
backend/js/Node.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function Node (name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
12
backend/js/Topic.js
Normal file
12
backend/js/Topic.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function Topic (name) {
|
||||||
|
this.name = name;
|
||||||
|
this.bag = true;
|
||||||
|
this.type = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
Array.prototype.indexOfTopic = function(name) {
|
||||||
|
for (var i = 0; i < this.length; i++)
|
||||||
|
if (this[i].name == name)
|
||||||
|
return i;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
function Topic(name, type)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
this.type = type;
|
|
||||||
|
|
||||||
this.includeInBag = false;
|
|
||||||
|
|
||||||
this.equals = function (otherTopic)
|
|
||||||
{
|
|
||||||
if( this.name == otherTopic.name && this.type == otherTopic.type)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
function containsTopic(obj, list) {
|
|
||||||
var x;
|
|
||||||
for (x in list) {
|
|
||||||
if (obj.equals(list[x])) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function testToics()
|
|
||||||
{
|
|
||||||
var topics = [new Topic("a","a_t"), new Topic("b","b_t"), new Topic("c","c_t")];
|
|
||||||
|
|
||||||
console.log("Testing Topic");
|
|
||||||
|
|
||||||
if (containsTopic(new Topic("a","a_t"),topics) == true)
|
|
||||||
{
|
|
||||||
console.log("pass")
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
console.log(" contains true fail")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (containsTopic(new Topic("d","d_t"),topics) == false)
|
|
||||||
{
|
|
||||||
console.log("pass")
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
console.log(" contains d fail")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testToics();
|
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
var ros = new ROSLIB.Ros();
|
var ros = new ROSLIB.Ros();
|
||||||
|
|
||||||
|
|
||||||
|
ros.topics = Array();
|
||||||
|
ros.nodes = Array();
|
||||||
ros.recording = false;
|
ros.recording = false;
|
||||||
|
ros.connected = false;
|
||||||
|
|
||||||
// ros.connectionName = 'ws://192.168.1.105:9090';
|
// ros.connectionName = 'ws://192.168.1.105:9090';
|
||||||
ros.connectionName = 'ws://localhost:9090';
|
ros.connectionName = 'ws://localhost:9090';
|
||||||
@@ -19,6 +23,7 @@ ros.on('error', function(error) {
|
|||||||
});
|
});
|
||||||
// Find out exactly when we made a connection.
|
// Find out exactly when we made a connection.
|
||||||
ros.on('connection', function() {
|
ros.on('connection', function() {
|
||||||
|
ros.connected = true;
|
||||||
console.log('Connection made!');
|
console.log('Connection made!');
|
||||||
document.getElementById("ConnectionIPForm").className = "form-group has-success has-feedback";
|
document.getElementById("ConnectionIPForm").className = "form-group has-success has-feedback";
|
||||||
document.getElementById("ConnectionIPInput").value = ros.connectionName;
|
document.getElementById("ConnectionIPInput").value = ros.connectionName;
|
||||||
@@ -33,7 +38,7 @@ ros.on('connection', function() {
|
|||||||
|
|
||||||
ros.on('close', function() {
|
ros.on('close', function() {
|
||||||
console.log('Connection closed.');
|
console.log('Connection closed.');
|
||||||
|
ros.connected = false;
|
||||||
document.getElementById("ConnectionIPForm").className = "form-group has-warning has-feedback";
|
document.getElementById("ConnectionIPForm").className = "form-group has-warning has-feedback";
|
||||||
document.getElementById("ConnectionIPLabel").innerHTML = 'Connection closed';
|
document.getElementById("ConnectionIPLabel").innerHTML = 'Connection closed';
|
||||||
document.getElementById("ConnectionButton").className = "btn btn-warning"
|
document.getElementById("ConnectionButton").className = "btn btn-warning"
|
||||||
@@ -51,6 +56,18 @@ ros.connect(ros.connectionName);
|
|||||||
|
|
||||||
function publishBagMessage(bagFilename)
|
function publishBagMessage(bagFilename)
|
||||||
{
|
{
|
||||||
|
var bag_file_message = ""
|
||||||
|
bag_file_message += bagFilename;
|
||||||
|
if (bagFilename != "STOP")
|
||||||
|
{
|
||||||
|
for (topic in ros.topics)
|
||||||
|
{
|
||||||
|
if(ros.topics[topic].bag)
|
||||||
|
{
|
||||||
|
bag_file_message += " " + ros.topics[topic].name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
var bagMessage = new ROSLIB.Message({
|
var bagMessage = new ROSLIB.Message({
|
||||||
data : bagFilename
|
data : bagFilename
|
||||||
})
|
})
|
||||||
@@ -82,18 +99,77 @@ bagNotifier.subscribe(function(message) {
|
|||||||
if (message.data === "STARTED") {
|
if (message.data === "STARTED") {
|
||||||
document.getElementById("recordButtonText").innerHTML = "Stop"
|
document.getElementById("recordButtonText").innerHTML = "Stop"
|
||||||
document.getElementById("recordButton").className = "btn btn-danger"
|
document.getElementById("recordButton").className = "btn btn-danger"
|
||||||
} else {
|
} else if (message.data === "STOPPED")
|
||||||
|
{
|
||||||
document.getElementById("recordButtonText").innerHTML = "Start"
|
document.getElementById("recordButtonText").innerHTML = "Start"
|
||||||
document.getElementById("recordButton").className = "btn btn-primary"
|
document.getElementById("recordButton").className = "btn btn-primary"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("bagNotifier: " +message.data)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Functions
|
// Functions
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
ros.buildTopicList = function(fresh_topics)
|
||||||
|
{
|
||||||
|
|
||||||
|
// console.log(topics)
|
||||||
|
// fresh_topics = fresh_topics.sort();
|
||||||
|
// First check that all our current topics are in the list of fresh_topics
|
||||||
|
for( var topic = 0; topic < ros.topics.length; topic ++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (fresh_topics.indexOf(ros.topics[topic].name) > -1)
|
||||||
|
{
|
||||||
|
// We know that we have already found that topic so we don't need to remove it
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// That topic is no longer being published so we need ro remove it
|
||||||
|
ros.topics.splice(topic,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var topic =0; topic < fresh_topics.length; topic ++ )
|
||||||
|
{
|
||||||
|
if (ros.topics.indexOfTopic(fresh_topics[topic]) > -1)
|
||||||
|
{
|
||||||
|
// We know that we have already found that topic so we don't need to re-add it
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We do not have that topic so we need to add it
|
||||||
|
// create the new topic
|
||||||
|
var new_topic = new Topic(fresh_topics[topic]);
|
||||||
|
// make sure to put in in the list in the order
|
||||||
|
ros.topics.push(new_topic);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ros.topics.sort(function(a, b) {
|
||||||
|
if ( a.name < b.name )
|
||||||
|
return -1;
|
||||||
|
if ( a.name > b.name )
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
})
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ros.getTopicsList = function()
|
||||||
|
{
|
||||||
|
// var topicList = [];
|
||||||
|
return ros.topics;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// attept to connect to the ros master from the IP given orgrab it from the form
|
// attept to connect to the ros master from the IP given orgrab it from the form
|
||||||
ros.attemptConnection = function(ipAddress)
|
ros.attemptConnection = function(ipAddress)
|
||||||
@@ -112,13 +188,25 @@ ros.attemptConnection = function(ipAddress)
|
|||||||
|
|
||||||
function toggleRecording()
|
function toggleRecording()
|
||||||
{
|
{
|
||||||
document.getElementById("recordButtonText").innerHTML = "Wait"
|
if(ros.connected)
|
||||||
document.getElementById("recordButton").className = "btn btn-warning"
|
{
|
||||||
if (!ros.recording) {
|
document.getElementById("recordButtonText").innerHTML = "Wait"
|
||||||
ros.recording = true
|
document.getElementById("recordButton").className = "btn btn-warning"
|
||||||
publishBagMessage(document.getElementById("recordText").value)
|
|
||||||
} else {
|
if (!ros.recording) {
|
||||||
ros.recording = false
|
ros.recording = true
|
||||||
publishBagMessage("STOP")
|
topicstobag = " "
|
||||||
|
for (i = 0; i < ros.topics.length; i ++)
|
||||||
|
{
|
||||||
|
if (ros.topics[i].bag == true)
|
||||||
|
{
|
||||||
|
topicstobag = topicstobag.concat(ros.topics[i].name + " ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publishBagMessage(document.getElementById("recordText").value + topicstobag)
|
||||||
|
} else {
|
||||||
|
ros.recording = false
|
||||||
|
publishBagMessage("STOP")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
ros.topics = [];
|
|
||||||
ros.nodes = [];
|
|
||||||
|
|
||||||
$("#myImage").click ( function (evt) {
|
$("#myImage").click ( function (evt) {
|
||||||
|
|
||||||
@@ -62,34 +60,41 @@ function updateVoltage(voltage)
|
|||||||
function updateTopicsGUI()
|
function updateTopicsGUI()
|
||||||
{
|
{
|
||||||
|
|
||||||
ros.getTopics(function(result)
|
ros.getTopics(ros.buildTopicList);
|
||||||
{
|
|
||||||
ros.topics = result;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
var topics = ros.topics;
|
var topics = ros.getTopicsList();
|
||||||
|
|
||||||
topics.sort();
|
|
||||||
if(topics != null){
|
if(topics != null){
|
||||||
var innerHTML = "";
|
var innerHTML = "";
|
||||||
for (var i = 0; i < topics.length; i++ )
|
for (var i = 0; i < topics.length; i++ )
|
||||||
{
|
{
|
||||||
innerHTML = innerHTML.concat(generateCheckbox(topics[i]));
|
innerHTML = innerHTML.concat(generateTopicCheckbox(topics[i]));
|
||||||
}
|
}
|
||||||
document.getElementById("ROSTopics").innerHTML = innerHTML;
|
document.getElementById("ROSTopics").innerHTML = innerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function generateCheckbox(name)
|
function generateTopicCheckbox(topic)
|
||||||
{
|
{
|
||||||
var str = "<div class=\"checkbox\"> <label><input type=\"checkbox\" value=\"\">";
|
var str = "<div class=\"checkbox\">";
|
||||||
str = str.concat(name);
|
var checked_str = "unchecked";
|
||||||
|
if (topic.bag == true)
|
||||||
|
{
|
||||||
|
checked_str = "checked"
|
||||||
|
}
|
||||||
|
str =str.concat("<label><input type=\"checkbox\" onclick=\"toggleToBag(\'"+ topic.name + "\')\" id=\"" + topic.name + "_checkbox\" "+ checked_str +">");
|
||||||
|
str = str.concat(topic.name);
|
||||||
str = str.concat("</label></div>");
|
str = str.concat("</label></div>");
|
||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function toggleToBag(topic_name)
|
||||||
|
{
|
||||||
|
// if($.inArray(topic_name, ros.topics))
|
||||||
|
ros.topics[ros.topics.indexOfTopic(topic_name)].bag = !ros.topics[ros.topics.indexOfTopic(topic_name)].bag ;
|
||||||
|
}
|
||||||
|
|
||||||
function updateNodesGUI()
|
function updateNodesGUI()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -99,6 +104,7 @@ function updateNodesGUI()
|
|||||||
});
|
});
|
||||||
|
|
||||||
var nodes = ros.nodes;
|
var nodes = ros.nodes;
|
||||||
|
|
||||||
nodes.sort()
|
nodes.sort()
|
||||||
|
|
||||||
if(nodes != null){
|
if(nodes != null){
|
||||||
@@ -115,8 +121,10 @@ function updateNodesGUI()
|
|||||||
};
|
};
|
||||||
|
|
||||||
window.setInterval(function(){
|
window.setInterval(function(){
|
||||||
updateTopicsGUI()
|
|
||||||
updateNodesGUI()
|
updateTopicsGUI();
|
||||||
|
updateNodesGUI();
|
||||||
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
function validateForm()
|
function validateForm()
|
||||||
@@ -155,6 +163,11 @@ function addInputsForConnection()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mylog(input)
|
||||||
|
{
|
||||||
|
console.log(input)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -21,11 +21,10 @@ Tutorials can be found here: http://www.w3schools.com/bootstrap/default.asp
|
|||||||
<script src="include/js/roslib.js"></script>
|
<script src="include/js/roslib.js"></script>
|
||||||
<script type="text/javascript" src="include/js/roslib.js"></script>
|
<script type="text/javascript" src="include/js/roslib.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="backend/js/custom_topics.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="backend/js/ros_scripts.js"></script>
|
<script type="text/javascript" src="backend/js/ros_scripts.js"></script>
|
||||||
<script type="text/javascript" src="backend/js/update_guis.js"></script>
|
<script type="text/javascript" src="backend/js/update_guis.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="backend/js/Topic.js"></script>
|
||||||
|
|
||||||
<audio id="audio" src="audio/beep-04.mp3" autostart="false" ></audio>
|
<audio id="audio" src="audio/beep-04.mp3" autostart="false" ></audio>
|
||||||
|
|
||||||
@@ -45,7 +44,7 @@ Tutorials can be found here: http://www.w3schools.com/bootstrap/default.asp
|
|||||||
<h1>Example GUI</h1>
|
<h1>Example GUI</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul id="tabs" class="nav nav-pills" data-tabs="tabs">
|
<ul id="tabs" class="nav nav-pills" data-tabs="tabs" >
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="#RobotInfo" data-toggle="tab">
|
<a href="#RobotInfo" data-toggle="tab">
|
||||||
Robot Display
|
Robot Display
|
||||||
@@ -73,6 +72,7 @@ Tutorials can be found here: http://www.w3schools.com/bootstrap/default.asp
|
|||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
Bagfile name must not start with "/"
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" id="recordText" class="form-control" placeholder="bag_filename">
|
<input type="text" id="recordText" class="form-control" placeholder="bag_filename">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
|
|||||||
27
launch.bash~
Normal file
27
launch.bash~
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
kill_child_processes() {
|
||||||
|
isTopmost=$1
|
||||||
|
curPid=$2
|
||||||
|
childPids=`ps -o pid --no-headers --ppid ${curPid}`
|
||||||
|
for childPid in $childPids
|
||||||
|
do
|
||||||
|
kill_child_processes 0 $childPid
|
||||||
|
done
|
||||||
|
if [ $isTopmost -eq 0 ]; then
|
||||||
|
kill -9 $curPid 2> /dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ctrl-C trap. Catches INT signal
|
||||||
|
trap "kill_child_processes 1 $$; exit 0" INT
|
||||||
|
|
||||||
|
chmod a+x src/bagger.py
|
||||||
|
|
||||||
|
x-terminal-emulator -e "roslaunch rosbridge_gui_example all.launch" &
|
||||||
|
x-terminal-emulator -e "python -m SimpleHTTPServer 8000" &
|
||||||
|
x-terminal-emulator -e "rostopic echo /bag_notifier" &
|
||||||
|
x-terminal-emulator -e "rosrun web_video_server web_video_server"
|
||||||
|
|
||||||
|
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" />
|
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" />
|
||||||
<include file="$(find rosbridge_gui_example)/launch/bagger.launch" />
|
<include file="$(find rosbridge_gui_example)/launch/bagger.launch" />
|
||||||
<include file="$(find rosbridge_gui_example)/launch/talker.launch" />
|
<include file="$(find rosbridge_gui_example)/launch/talker.launch" />
|
||||||
</launch>
|
</launch>
|
||||||
|
|||||||
5
launch/all.launch~
Normal file
5
launch/all.launch~
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<launch>
|
||||||
|
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" />
|
||||||
|
<include file="$(find rosbridge_gui_example)/launch/bagger.launch" />
|
||||||
|
<include file="$(find rosbridge_gui_example)/launch/talker.launch" />
|
||||||
|
</launch>
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
<!-- ##################################### D-PAD ######################################### -->
|
<!-- ##################################### D-PAD ######################################### -->
|
||||||
|
<!--
|
||||||
|
|
||||||
<p>Click in the actual image. Relative coordinates will be displayed.</p>
|
<p>Click in the actual image. Relative coordinates will be displayed.</p>
|
||||||
<p id="rez"></p>
|
<p id="rez"></p>
|
||||||
<div>
|
<div>
|
||||||
<img id="myImage" src="http://animalia-life.com/data_images/dog/dog4.jpg">
|
<img id="myImage" src="/backend/images/D-pad.png">
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- ##################################### END D-PAD ######################################### -->
|
<!-- ##################################### END D-PAD ######################################### -->
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,28 @@ class Bagger(object):
|
|||||||
os.killpg(self.proc.pid, signal.SIGINT)
|
os.killpg(self.proc.pid, signal.SIGINT)
|
||||||
self.pub.publish("STOPPED")
|
self.pub.publish("STOPPED")
|
||||||
else:
|
else:
|
||||||
bag_file = os.path.join(self.data_path, msg.data)
|
msg_data = msg.data.split()
|
||||||
self.proc = subprocess.Popen(["rosbag", "record",
|
self.pub.publish(str(len(msg_data)))
|
||||||
"--all", "-o", bag_file], preexec_fn=os.setsid)
|
self.pub.publish(str(msg_data))
|
||||||
self.pub.publish("STARTED")
|
if len(msg_data) == 0: # We only got the name of the bag file and not any topics
|
||||||
|
bag_file_name = os.path.join(self.data_path, "bag_file")
|
||||||
|
self.proc = subprocess.Popen(["rosbag", "record",
|
||||||
|
"--all", "-o", bag_file_name], preexec_fn=os.setsid)
|
||||||
|
self.pub.publish("STARTED")
|
||||||
|
elif len(msg_data) == 1: # We only got the name of the bag file and not any topics
|
||||||
|
bag_file_name = os.path.join(self.data_path, msg_data)
|
||||||
|
self.proc = subprocess.Popen(["rosbag", "record",
|
||||||
|
"--all", "-o", bag_file_name], preexec_fn=os.setsid)
|
||||||
|
self.pub.publish("STARTED")
|
||||||
|
else: #we posibly have a bag file name and a list of topics
|
||||||
|
if msg_data[0].startswith("/"): #then we know there is no bag file name
|
||||||
|
msg_data = ["bagfile"] + msg_data
|
||||||
|
msg_data[0] = os.path.join(self.data_path, msg_data[0])
|
||||||
|
processList = ["rosbag", "record", "-o"] + msg_data
|
||||||
|
self.pub.publish(" ".join(processList))
|
||||||
|
self.proc = subprocess.Popen( processList, preexec_fn=os.setsid)
|
||||||
|
self.pub.publish("STARTED")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
Bagger()
|
Bagger()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class Bagger(object):
|
|||||||
self.pub = rospy.Publisher("bag_notifier", String, queue_size=10)
|
self.pub = rospy.Publisher("bag_notifier", String, queue_size=10)
|
||||||
self.proc = None
|
self.proc = None
|
||||||
rospack = rospkg.RosPack()
|
rospack = rospkg.RosPack()
|
||||||
self.data_path = os.path.join(rospack.get_path("rosbridge_GUI_example"), "data")
|
self.data_path = os.path.join(rospack.get_path("rosbridge_gui_example"), "data")
|
||||||
|
|
||||||
def callback(self, msg):
|
def callback(self, msg):
|
||||||
if msg.data == "STOP" and self.proc is not None:
|
if msg.data == "STOP" and self.proc is not None:
|
||||||
@@ -22,9 +22,8 @@ class Bagger(object):
|
|||||||
self.pub.publish("STOPPED")
|
self.pub.publish("STOPPED")
|
||||||
else:
|
else:
|
||||||
bag_file = os.path.join(self.data_path, msg.data)
|
bag_file = os.path.join(self.data_path, msg.data)
|
||||||
self.proc = subprocess.Popen(["rosbag", "record",
|
self.proc = subprocess.Popen(["rosbag", "record", "-o", bag_file], preexec_fn=os.setsid)
|
||||||
"kinect2/depth_lowres/points", "kinect2/rgb_lowres/image",
|
self.pub.publish(["rosbag", "record", "-o", bag_file])
|
||||||
"tf", "imu/data", "-o", bag_file], preexec_fn=os.setsid)
|
|
||||||
self.pub.publish("STARTED")
|
self.pub.publish("STARTED")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user