Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

Commit

Permalink
solved little bugs with uav_viewer_py
Browse files Browse the repository at this point in the history
  • Loading branch information
fqez committed Dec 21, 2017
1 parent ba6bc87 commit c51978b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/tools/uav_viewer_py/gui/cameraWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def initUI(self):

def updateImage(self):

img = self.winParent.getCamera().getImage()
img = self.winParent.getCamera().getImage().data
if img is not None:
image = QImage(img.data, img.shape[1], img.shape[0], img.shape[1] * img.shape[2], QImage.Format_RGB888);

Expand Down
12 changes: 6 additions & 6 deletions src/tools/uav_viewer_py/gui/sensorsWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ def initUI(self):
self.setLayout(self.mainLayout);

def updateSensors(self):
pose = self.winParent.getPose3D().getPose3D()
pose = self.winParent.getPose3D().getPose3d()

if pose != None:
qw = pose.q0
qx = pose.q1
qy = pose.q2
qz = pose.q3
qw = pose.q[0]
qx = pose.q[1]
qy = pose.q[2]
qz = pose.q[3]
self.drawAltd(pose.z)
self.drawYawValues(self.quatToYaw(qw, qx, qy, qz) * 180 / math.pi)
self.drawPitchRollValues(self.quatToPitch(qw, qx, qy, qz) * 180 / math.pi,
self.quatToRoll(qw, qx, qy, qz) * 180 / math.pi)

navdata = self.winParent.getNavData().getNavdata()
navdata = self.winParent.getNavData().getNavData()

if navdata != None:
self.battery.setValue(navdata.batteryPercent)
Expand Down
42 changes: 37 additions & 5 deletions src/tools/uav_viewer_py/uav_viewer_py.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
UAVViewer:
Camera: "default -h 0.0.0.0 -p 9999"
Pose3D: "default -h 0.0.0.0 -p 9999"
Navdata: "default -h 0.0.0.0 -p 9999"
CMDVel: "default -h 0.0.0.0 -p 9999"
Extra: "default -h 0.0.0.0 -p 9999"
Camera:
Server: 1 # 0 -> Deactivate, 1 -> Ice , 2 -> ROS
Proxy: "Camera:default -h localhost -p 9000"
Format: RGB8
Topic: "/IntrorobROS/image_raw"
Name: UAVViewerCamera

Pose3D:
Server: 1 # 0 -> Deactivate, 1 -> Ice , 2 -> ROS
Proxy: "Pose3D:default -h localhost -p 9000"
Topic: "/IntrorobROS/Pose3D"
Name: UAVViewerPose3d

CMDVel:
Server: 1 # 0 -> Deactivate, 1 -> Ice , 2 -> ROS
Proxy: "CMDVel:tcp -h localhost -p 9000"
Topic: "/IntrorobROS/CMDVel"
Name: UAVViewerCMDVel

Navdata:
Server: 1 # 0 -> Deactivate, 1 -> Ice , 2 -> ROS
Proxy: "Navdata:tcp -h localhost -p 9000"
Topic: "/IntrorobROS/Navdata"
Name: UAVViewerNavdata

Extra:
Server: 1 # 0 -> Deactivate, 1 -> Ice , 2 -> ROS
Proxy: "Extra:tcp -h localhost -p 9000"
Topic: "/IntrorobROS/Extra"
Name: UAVViewerExtra

Xmax: 10
Ymax: 10
Zmax: 5
Yawmax: 1

NodeName: UAVViewer

0 comments on commit c51978b

Please sign in to comment.