To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 5306901d authored by beuchatp's avatar beuchatp
Browse files

Small changes... cannot quite remember what

parent 39b458bd
# TO RUN THE SYSTEM FULLY ON THE LOCAL COMPUTER:
#export ROS_MASTER_URI=http://localhost:11311
export ROS_MASTER_URI=http://localhost:11311
# TO RUN THE SYSTEM ON A DEFAULT CONFIGURATION OF THE NETWROK:
export ROS_MASTER_URI=http://teacher:11311
#export ROS_MASTER_URI=http://teacher:11311
# OTHER NECESSARY ENVIRONMENT VARIABLES:
export ROS_IP=$(hostname -I | awk '{print $1;}')
export DFALL_DEFAULT_AGENT_ID=$(cat /etc/dfall_default_agent_id)
......
#!/usr/bin/env python
#!/usr/bin/python3.5
# -*- coding: utf-8 -*-
# OPTIONS: #!/usr/bin/env python
# OR: #!/usr/bin/python3
# WHERE THE KEY INSTALLATIONS TO USE python3 ARE:
# sudo apt-get install python3-pip python3-yaml
# pip3 install rospkg catkin_pkg --user
# pip3 install qtm --user
# Copyright (C) 2017, ETH Zurich, D-ITET, Paul Beuchat
#
# This file is part of D-FaLL-System.
......@@ -116,7 +125,7 @@ import qtm
# Setup the ROS logging
rp = RosPack()
record_file = rp.get_path('dfall_pkg') + '/LoggingOnboard.bag'
rospy.loginfo('afdsasdfasdfsadfasdfasdfasdfasdfasdfasdf')
#rospy.loginfo('afdsasdfasdfsadfasdfasdfasdfasdfasdfasdf')
rospy.loginfo(record_file)
bag = rosbag.Bag(record_file, 'w')
......@@ -373,8 +382,8 @@ class QualisysDataPublisher:
# return self._status
# CALLBACK FOR QTM DISCONNECTED
#async def on_qtm_disconnect(self, reason):
def on_qtm_disconnect(self, reason):
async def on_qtm_disconnect(self, reason):
#def on_qtm_disconnect(self, reason):
# "Clear" the QTM connection object
self._qtm_connection = None
......@@ -387,11 +396,11 @@ class QualisysDataPublisher:
# GETTERS AND SETTERS
@qtmStatus.setter
def qtmStatus(self, value):
if value != self._qtm_status:
self._qtm_status = value
print "[QUALISYS DATA PUBLISHER] QTM Connection status changed to: %s" % self._qtm_status
# @qtmStatus.setter
# def qtmStatus(self, value):
# if value != self._qtm_status:
# self._qtm_status = value
# rospy.loginfo("[QUALISYS DATA PUBLISHER] QTM Connection status changed to: %s", self._qtm_status)
......@@ -441,10 +450,12 @@ if __name__ == '__main__':
# > The "Qualisys Computer" runs the "QTM" software that
# is the heart of the Qualisys Motion Capture system
if not rospy.has_param("~hostName"):
print"[QUALISYS DATA PUBLISHER] ERROR, hostName parameter not found."
rospy.loginfo("[QUALISYS DATA PUBLISHER] ERROR, hostName parameter not found.")
qtm_ip = rospy.get_param("~hostName")
# INFORM THE USER
rospy.loginfo("[QUALISYS DATA PUBLISHER] Now attempting to connection to QTM server at IP address: %s", qtm_ip)
# ENTER A WHILE LOOP FOR ATTEMPTING TO CONNECT
qtm_is_connected = False
......@@ -452,6 +463,7 @@ if __name__ == '__main__':
while not(qtm_is_connected):
# ATTEMPT TO CONNECT TO THE QTM MANAGER
connection = await qtm.connect("127.0.0.1")
connection = await qtm.connect(
qtm_ip,
on_event=self.on_qtm_event,
......@@ -476,7 +488,7 @@ if __name__ == '__main__':
# PAUSE FOR A SECOND AND THEN SPIN
time.sleep(1.0)
print "[QUALISYS DATA PUBLISHER] Node READY :-)"
rospy.loginfo("[QUALISYS DATA PUBLISHER] Node READY :-)")
rospy.spin()
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment