This repository has been archived by the owner on Feb 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #710 from aitormf/tools/basic_component_py/707
[issue #707] Added Logo and JderobotComm to basic_component_py
- Loading branch information
Showing
11 changed files
with
216 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
basic_component.Camera.Proxy=cam_turtlebot_right:default -h localhost -p 8994 | ||
basic_component.Camera.Format=RGB8 | ||
|
||
############ Motors ####################### | ||
# 0 -> Deactivate, 1 -> Ice , 2 -> ROS | ||
basic_component.Motors.Server=1 | ||
basic_component.Motors.Proxy=Motors:default -h localhost -p 8999 | ||
basic_component.Motors.Topic=/cmd_vel_mux/input/teleop | ||
basic_component.Motors.Name=FolowLineMotors | ||
|
||
#basic_component.Motors.maxV = 5 | ||
#basic_component.Motors.maxW = 0.5 | ||
|
||
############ Camera ####################### | ||
# 0 -> Deactivate, 1 -> Ice , 2 -> ROS | ||
basic_component.Camera.Server=1 | ||
basic_component.Camera.Proxy=cam_turtlebot_right:default -h localhost -p 8994 | ||
basic_component.Camera.Format=RGB8 | ||
basic_component.Camera.Topic=/camera/rgb/image_raw | ||
basic_component.Camera.Name=basic_component_pyCamera | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
cd resources | ||
pyrcc5 resources.qrc -o resources_rc.py | ||
mv resources_rc.py .. | ||
|
||
cd ../gui | ||
pyuic5 ui_gui.ui > ui_gui.py | ||
cd .. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# Copyright (C) 1997-2015 JDE Developers Team | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see http://www.gnu.org/licenses/. | ||
# Authors : | ||
# Alberto Martin Florido <almartinflorido@gmail.com> | ||
# | ||
import resources_rc | ||
from PyQt5 import QtGui | ||
from PyQt5.QtCore import pyqtSignal, QPointF, Qt, QPoint | ||
from PyQt5.QtWidgets import QWidget, QGridLayout | ||
|
||
class LogoWidget(QWidget): | ||
|
||
def __init__(self,winParent, width=0, height=0): | ||
super(LogoWidget, self).__init__() | ||
self.winParent=winParent | ||
qimage=QtGui.QImage() | ||
qimage.load(':images/jderobot.svg') | ||
if (width != 0 and height != 0): | ||
self.qimage = qimage.scaled(0.8*width, 0.8*height, Qt.KeepAspectRatio) | ||
#self.qimage = qimage.scaled(0.8*width, 0.8*height) | ||
self.resize(width, height) | ||
else: | ||
self.qimage = qimage | ||
|
||
|
||
def paintEvent(self, e): | ||
|
||
painter=QtGui.QPainter(self) | ||
painter.drawImage(self.width()/2-self.qimage.width()/2, self.height()/2-self.qimage.height()/2, self.qimage) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<RCC> | ||
<qresource prefix="images"> | ||
<file>ball.png</file> | ||
<file>jderobot.svg</file> | ||
</qresource> | ||
</RCC> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters