2017-10-25 23:52:24 -0500 | received badge | ● Famous Question
(source)
|
2016-12-22 06:49:01 -0500 | received badge | ● Famous Question
(source)
|
2016-09-12 11:04:17 -0500 | received badge | ● Famous Question
(source)
|
2016-06-15 04:15:26 -0500 | received badge | ● Notable Question
(source)
|
2016-06-10 09:47:15 -0500 | received badge | ● Popular Question
(source)
|
2016-06-10 07:38:17 -0500 | commented answer | Qt - Display topic image_raw on GUI Oh sorry. Ok Thank you very much. |
2016-06-10 06:07:22 -0500 | received badge | ● Student
(source)
|
2016-06-09 14:33:22 -0500 | received badge | ● Notable Question
(source)
|
2016-06-09 14:25:19 -0500 | asked a question | Qt - Display topic image_raw on GUI I think the title says all. I have a GUI on qt and I have a topic called robot/image_raw. The problem is how can i display it on my gui project? Thanks |
2016-06-08 15:40:32 -0500 | commented answer | Error: Threads Multiple Definition of I dont but I will download and add you. |
2016-06-08 14:37:10 -0500 | commented answer | Error: Threads Multiple Definition of On the bottom there's the copy-pasted drone_estimation2,UINode2 and autopilot2. If you need any help talk to me and I answer fast.
http://www.megafileupload.com/juZD/ca... Thx for helping me :) Greetings from Portugal. Is that a KUKA robot behind you? |
2016-06-08 14:35:02 -0500 | commented answer | Error: Threads Multiple Definition of I uploaded the catkin folder. The project is on catkin/src/tum_ardrone/src and it's the UINode. I already deleted but I had a copy-paste folder renamed to UINode2. If u see I have drone_estimation2 and autopilot2 and they work fine. The only problem is on UINode. Check the CMakeLists. |
2016-06-08 14:35:02 -0500 | received badge | ● Commentator
|
2016-06-08 14:29:39 -0500 | received badge | ● Notable Question
(source)
|
2016-06-08 14:20:32 -0500 | commented answer | Error: Threads Multiple Definition of Thank you. Anyhow I would like to pay you if u fix it. :D |
2016-06-08 14:07:28 -0500 | commented answer | Error: Threads Multiple Definition of Maybe I can give you the code and u fix it? I can pay via paypal. Thank you. |
2016-06-07 18:35:38 -0500 | commented answer | Error: Threads Multiple Definition of Everything works perfectly if I compile only one UINode. I just copy-pasted and renamed another folder to UINode2. But I cant compile UINode and UINode2 because it gives me the error above.
tum_ardrone_gui.h is the header file. It only declares functions |
2016-06-07 15:39:29 -0500 | received badge | ● Popular Question
(source)
|
2016-06-07 14:28:54 -0500 | commented answer | Error: Threads Multiple Definition of |
2016-06-07 14:27:08 -0500 | commented answer | Error: Threads Multiple Definition of Thx for helping. In tum_ardrone_gui.h I will post it. |
2016-06-07 13:55:51 -0500 | asked a question | Error: Threads Multiple Definition of I have two GUI exactly the same except a few alterations. I copy-paste the code and changed only the node. Code: #include "tum_ardrone_gui.h"
#include "RosThread.h"
//#include "PingThread.h"
#include "time.h"
//#include "../HelperFunctions.h"
#include "ros/ros.h"
#include "ros/package.h"
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <string.h>
int getdirtxt (std::string dir, std::vector<std::string> &files)
{
DIR *dp;
struct dirent *dirp;
if((dp = opendir(dir.c_str())) == NULL) {
std::cout << "Error(" << errno << ") opening " << dir << std::endl;
return errno;
}
while ((dirp = readdir(dp)) != NULL) {
std::string f = dirp->d_name;
if(f.size() > 4 && f.substr(f.size()-4) == ".txt")
files.push_back(std::string(dirp->d_name));
}
closedir(dp);
return 0;
}
tum_ardrone_gui::tum_ardrone_gui(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
rosThread = NULL;
sensGaz = sensYaw = sensRP = 1;
currentControlSource = CONTROL_NONE;
useHovering = true;
for(int i=0;i<8;i++)
{
isPressed[i] = false;
lastRepeat[i] = 0;
}
QObject::connect( this, SIGNAL(setCountsSignal(unsigned int,unsigned int,unsigned int,unsigned int) ),
this, SLOT( setCountsSlot(unsigned int,unsigned int,unsigned int,unsigned int) ) );
QObject::connect( this, SIGNAL( setPingsSignal(int, int) ),
this, SLOT( setPingsSlot(int, int) ) );
QObject::connect( this, SIGNAL( setControlSourceSignal(int) ),
this, SLOT( setControlSourceSlot(int) ) );
QObject::connect( this, SIGNAL( addLogLineSignal(QString) ),
this, SLOT( addLogLineSlot(QString) ) );
QObject::connect( this, SIGNAL( setAutopilotInfoSignal(QString) ),
this, SLOT( setAutopilotInfoSlot(QString) ) );
QObject::connect( this, SIGNAL( setStateestimationInfoSignal(QString) ),
this, SLOT( setStateestimationInfoSlot(QString) ) );
QObject::connect( this, SIGNAL( setMotorSpeedsSignal(QString) ),
this, SLOT( setMotorSpeedsSlot(QString) ) );
QObject::connect( this, SIGNAL( closeWindowSignal() ),
this, SLOT( closeWindowSlot() ) );
std::vector<std::string> files = std::vector<std::string>();
getdirtxt( ros::package::getPath("tum_ardrone") + std::string("/flightPlans/"),files);
ui.comboBoxLoadFile->addItem(QString(""), QVariant());
for(unsigned int i=0;i<files.size();i++)
ui.comboBoxLoadFile->addItem(QString(files[i].c_str()), QVariant());
}
tum_ardrone_gui::~tum_ardrone_gui()
{
}
// clicked functions
void tum_ardrone_gui::LandClicked()
{
rosThread->sendLand();
}
void tum_ardrone_gui::TakeoffClicked()
{
rosThread->sendTakeoff();
}
void tum_ardrone_gui::ToggleCamClicked()
{
rosThread->sendToggleCam();
}
void tum_ardrone_gui::FlattrimClicked()
{
rosThread->sendFlattrim();
}
void tum_ardrone_gui::EmergencyClicked()
{
rosThread->sendToggleState();
}
void tum_ardrone_gui::ClearClicked()
{
rosThread->publishCommand("c clearCommands");
}
void tum_ardrone_gui::SendClicked()
{
QStringList l = ui.plainTextEditSendCommand->toPlainText().split('\n');
for(int i=0;i<l.length();i++)
{
std::string s = l[i].trimmed().toStdString();
if(s.size() > 0)
rosThread->publishCommand(std::string("c ")+s);
}
setControlSource(CONTROL_AUTO);
}
void tum_ardrone_gui::ClearSendClicked()
{
ClearClicked();
SendClicked();
}
void tum_ardrone_gui::ResetClicked()
{
setControlSource(CONTROL_NONE);
ClearClicked();
rosThread->publishCommand("f reset");
}
void tum_ardrone_gui::LoadFileChanged(QString val)
{
if(val == "")
ui.plainTextEditSendCommand->setPlainText("");
else
{
std::string path = ros::package::getPath("tum_ardrone") + std::string("/flightPlans/") + val.toStdString();
addLogLine("Load File "+ path);
std::ifstream t;
t.open(path.c_str());
std::string buffer = "";
std::string line;
while(!t.eof())
{
std::getline(t, line);
buffer = buffer + line + "\n";
}
t.close();
ui.plainTextEditSendCommand->setPlainText(buffer.c_str());
}
}
void tum_ardrone_gui::ToggledUseHovering(int val)
{
useHovering = (val != 0);
}
void tum_ardrone_gui::ToggledPingDrone(int val)
{
pingThread->measure = (val != 0);
}
// change control source functions
void tum_ardrone_gui::ControlSourceChanged()
{
ControlSource s = CONTROL_NONE;
if(ui.radioButtonControKB->isChecked())
s = CONTROL_KB;
if(ui.radioButtonControlNone->isChecked())
s = CONTROL_NONE;
if(ui.radioButtonControlJoy->isChecked())
s = CONTROL_JOY;
if(ui.radioButtonControlAuto->isChecked())
s = CONTROL_AUTO;
if(s != CONTROL_AUTO)
rosThread->publishCommand("c stop");
else
rosThread->publishCommand("c ... (more) |
2016-06-06 14:35:17 -0500 | received badge | ● Popular Question
(source)
|
2016-06-06 12:24:40 -0500 | answered a question | ROS two different nodes in the same package Copy paste the code in CMakeLists.txt and replace with a 2 in the end did the trick. This is bad code development xD. Thanks anyway. |
2016-06-06 12:10:17 -0500 | received badge | ● Editor
(source)
|
2016-06-06 12:09:10 -0500 | commented answer | ROS two different nodes in the same package The problem is that when I run roslaunch it only starts 2 instances of the nodes Autopilot,StateEstimation and UINode and not Autopilot,StateEstimation and UINode and Autopilot2,StateEstimation2 and UINode2 |
2016-06-06 12:08:39 -0500 | commented answer | ROS two different nodes in the same package Basically I copy-paste the folders inside src ( Autopilot,StateEstimation and UINode ) and changed the code in each one to read /drone1/image_raw and /drone2/image_raw in ( Autopilot2,StateEstimation2 and UINode2 ). |
2016-06-06 12:05:38 -0500 | commented answer | ROS two different nodes in the same package Thank you for your help. Gives me: Error Cannot launch node of type tum_ardrone_droneautopilot2. |
2016-06-06 12:01:36 -0500 | commented answer | ROS two different nodes in the same package Thank you for your help. Gives me: Error Cannot launch node of type tum_ardrone_droneautopilot2. |
2016-06-06 11:47:25 -0500 | answered a question | ROS two different nodes in the same package Maybe I have to mess with CMakeLists.txt? But what can I do? #
#
cmake_minimum_required(VERSION 2.8.3)
project(tum_ardrone) Find catkin macros and libraries find_package(catkin REQUIRED COMPONENTS
ardrone_autonomy
cv_bridge
dynamic_reconfigure
geometry_msgs
sensor_msgs
std_msgs
std_srvs
message_generation
roscpp
rospy
) Compile third party libs include(ExternalProject)
ExternalProject_Add(thirdparty
URL ${PROJECT_SOURCE_DIR}/thirdparty/thirdparty.tar.gz
PREFIX ${CMAKE_BINARY_DIR}/thirdparty
CONFIGURE_COMMAND ""
BUILD_COMMAND make
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
) ------------------- add dynamic reconfigure api ------------------------------------ generate_dynamic_reconfigure_options(
cfg/AutopilotParams.cfg
cfg/GUIParams.cfg
cfg/StateestimationParams.cfg
) ################################################ Declare ROS messages, services and actions ################################################ Generate messages in the 'msg' folder add_message_files(FILES filter_state.msg) Generate services in the 'srv' folder add_service_files(
DIRECTORY srv
FILES
SetReference.srv
SetMaxControl.srv
SetInitialReachDistance.srv
SetStayWithinDistance.srv
SetStayTime.srv
) Generate added messages generate_messages(DEPENDENCIES std_msgs) ################################### catkin specific configuration ###################################
catkin_package(CATKIN_DEPENDS message_runtime std_msgs ardrone_autonomy) ########### Build ###########
include_directories(${catkin_INCLUDE_DIRS}) --------------------------- stateestimation & PTAM -------------------------------- set header ans source files set(STATEESTIMATION_SOURCE_FILES
src/stateestimation/GLWindow2.cc
src/stateestimation/GLWindowMenu.cc
src/stateestimation/main_stateestimation.cpp
src/stateestimation/DroneKalmanFilter.cpp
src/stateestimation/Predictor.cpp
src/stateestimation/PTAMWrapper.cpp
src/stateestimation/MapView.cpp
src/stateestimation/EstimationNode.cpp
src/stateestimation/PTAM/ATANCamera.cc
src/stateestimation/PTAM/Bundle.cc
src/stateestimation/PTAM/HomographyInit.cc
src/stateestimation/PTAM/KeyFrame.cc
src/stateestimation/PTAM/Map.cc
src/stateestimation/PTAM/MapMaker.cc
src/stateestimation/PTAM/MapPoint.cc
src/stateestimation/PTAM/MiniPatch.cc
src/stateestimation/PTAM/PatchFinder.cc
src/stateestimation/PTAM/Relocaliser.cc
src/stateestimation/PTAM/ShiTomasi.cc
src/stateestimation/PTAM/SmallBlurryImage.cc
src/stateestimation/PTAM/Tracker.cc
)
set(STATEESTIMATION_HEADER_FILES
src/stateestimation/GLWindow2.h
src/stateestimation/GLWindowMenu.h
src/stateestimation/MouseKeyHandler.h
src/HelperFunctions.h
src/stateestimation/DroneKalmanFilter.h
src/stateestimation/Predictor.h
src/stateestimation/PTAMWrapper.h
src/stateestimation/MapView.h
src/stateestimation/EstimationNode.h
src/stateestimation/PTAM/ATANCamera.h
src/stateestimation/PTAM/Bundle.h
src/stateestimation/PTAM/customFixes.h
src/stateestimation/PTAM/HomographyInit.h
src/stateestimation/PTAM/KeyFrame.h
src/stateestimation/PTAM/LevelHelpers.h
src/stateestimation/PTAM/Map.h
src/stateestimation/PTAM/MapMaker.h
src/stateestimation/PTAM/MapPoint.h
src/stateestimation/PTAM/MEstimator.h
src/stateestimation/PTAM/MiniPatch.h
src/stateestimation/PTAM/OpenGL.h
src/stateestimation/PTAM/PatchFinder.h
src/stateestimation/PTAM/Relocaliser.h
src/stateestimation/PTAM/settingsCustom.h
src/stateestimation/PTAM/ShiTomasi.h
src/stateestimation/PTAM/SmallBlurryImage.h
src/stateestimation/PTAM/SmallMatrixOpts.h
src/stateestimation/PTAM/TrackerData.h
src/stateestimation/PTAM/Tracker.h
src/stateestimation/PTAM/VideoSource.h
) set required libs and headers include_directories(
${CMAKE_BINARY_DIR}/thirdparty/src/thirdparty/TooN/include
${CMAKE_BINARY_DIR}/thirdparty/src/thirdparty/libcvd/include
${CMAKE_BINARY_DIR}/thirdparty/src/thirdparty/gvars3/include
) link_directories(
${CMAKE_BINARY_DIR}/thirdparty/src/thirdparty/libcvd/lib
${CMAKE_BINARY_DIR}/thirdparty/src/thirdparty/gvars3/lib
)
set(PTAM_LIBRARIES GL glut cvd GVars3 blas lapack)
add_definitions(-DKF_REPROJ) build! add_executable(drone_stateestimation ${STATEESTIMATION_SOURCE_FILES} ${STATEESTIMATION_HEADER_FILES})
set_target_properties(drone_stateestimation PROPERTIES COMPILE_FLAGS "-D_LINUX -D_REENTRANT -Wall -O3 -march=nocona -msse3")
target_link_libraries(drone_stateestimation ${PTAM_LIBRARIES} ${catkin_LIBRARIES})
add_dependencies(drone_stateestimation thirdparty ${PROJECT_NAME}_gencpp ${PROJECT_NAME}_gencfg) ------------------------- autopilot & KI ----------------------------------------- set header ans source files set(AUTOPILOT_SOURCE_FILES
src/autopilot/main_autopilot.cpp
src/autopilot/ControlNode.cpp
src/autopilot/DroneController.cpp
src/autopilot/KI/KILand.cpp
src/autopilot/KI/KIAutoInit.cpp
src/autopilot/KI/KIFlyTo.cpp ... (more) |
2016-06-06 11:23:48 -0500 | asked a question | ROS two different nodes in the same package Hello.
My package name is tum_ardrone. Inside the src file I have Autopilot,StateEstimation and UINode. I Created Autopilot2,StateEstimation2 and UINode2 to run two robots. When I run the launch file: <launch>
<group ns="controlo_drone1">
<node name="drone_stateestimation" pkg="tum_ardrone" type="drone_stateestimation">
</node>
<node name="drone_autopilot" pkg="tum_ardrone" type="drone_autopilot">
</node>
<node name="drone_gui" pkg="tum_ardrone" type="drone_gui">
</node>
</group>
<group ns="controlo_drone2">
<node name="drone_stateestimation2" pkg="tum_ardrone" type="drone_stateestimation">
</node>
<node name="drone_autopilot2" pkg="tum_ardrone" type="drone_autopilot">
</node>
<node name="drone_gui2" pkg="tum_ardrone" type="drone_gui">
</node>
</group>
</launch>
I want to run Autopilot,StateEstimation and UINode and Autopilot2,StateEstimation2 and UINode2. But when I run the launch file it runs two instances of Autopilot,StateEstimation and UINode and not my Autopilot2,StateEstimation2 and UINode2. Basically I copy-paste the folders inside src ( Autopilot,StateEstimation and UINode ) and changed the code in each one to read /drone1/image_raw and /drone2_image_raw in ( Autopilot2,StateEstimation2 and UINode2 ). The problem is that when I run roslaunch it only starts 2 instances of the nodes Autopilot,StateEstimation and UINode and not Autopilot,StateEstimation and UINode and Autopilot2,StateEstimation2 and UINode2 Any idea? Please help me. Edit: Maybe I have to mess with CMakeLists.txt? But what can I do? #
# Author: Jakob Engel <jajuengel@gmail.com>
# Contributor: Stefan Wilkes <stefan.wilkes@gmail.com>
#
cmake_minimum_required(VERSION 2.8.3)
project(tum_ardrone)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
ardrone_autonomy
cv_bridge
dynamic_reconfigure
geometry_msgs
sensor_msgs
std_msgs
std_srvs
message_generation
roscpp
rospy
)
# Compile third party libs
include(ExternalProject)
ExternalProject_Add(thirdparty
URL ${PROJECT_SOURCE_DIR}/thirdparty/thirdparty.tar.gz
PREFIX ${CMAKE_BINARY_DIR}/thirdparty
CONFIGURE_COMMAND ""
BUILD_COMMAND make
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
)
# ------------------- add dynamic reconfigure api ------------------------------------
generate_dynamic_reconfigure_options(
cfg/AutopilotParams.cfg
cfg/GUIParams.cfg
cfg/StateestimationParams.cfg
)
################################################
## Declare ROS messages, services and actions ##
################################################
## Generate messages in the 'msg' folder
add_message_files(FILES filter_state.msg)
## Generate services in the 'srv' folder
add_service_files(
DIRECTORY srv
FILES
SetReference.srv
SetMaxControl.srv
SetInitialReachDistance.srv
SetStayWithinDistance.srv
SetStayTime.srv
)
## Generate added messages
generate_messages(DEPENDENCIES std_msgs)
###################################
## catkin specific configuration ##
###################################
catkin_package(CATKIN_DEPENDS message_runtime std_msgs ardrone_autonomy)
###########
## Build ##
###########
include_directories(${catkin_INCLUDE_DIRS})
# --------------------------- stateestimation & PTAM --------------------------------
# set header ans source files
set(STATEESTIMATION_SOURCE_FILES
src/stateestimation/GLWindow2.cc
src/stateestimation/GLWindowMenu.cc
src/stateestimation/main_stateestimation.cpp
src/stateestimation/DroneKalmanFilter.cpp
src/stateestimation/Predictor.cpp
src/stateestimation/PTAMWrapper.cpp
src/stateestimation/MapView.cpp
src/stateestimation/EstimationNode.cpp
src/stateestimation/PTAM/ATANCamera.cc
src/stateestimation/PTAM/Bundle.cc
src/stateestimation/PTAM/HomographyInit.cc
src/stateestimation/PTAM/KeyFrame.cc
src/stateestimation/PTAM/Map.cc
src/stateestimation/PTAM/MapMaker.cc
src/stateestimation/PTAM/MapPoint.cc
src/stateestimation/PTAM/MiniPatch.cc
src/stateestimation/PTAM/PatchFinder.cc
src/stateestimation/PTAM/Relocaliser.cc
src/stateestimation/PTAM/ShiTomasi.cc
src/stateestimation/PTAM/SmallBlurryImage.cc
src/stateestimation/PTAM/Tracker.cc
)
set(STATEESTIMATION_HEADER_FILES
src/stateestimation/GLWindow2.h
src/stateestimation/GLWindowMenu.h
src/stateestimation/MouseKeyHandler.h
src/HelperFunctions.h
src/stateestimation/DroneKalmanFilter.h
src/stateestimation/Predictor.h
src/stateestimation/PTAMWrapper.h
src/stateestimation/MapView.h
src/stateestimation/EstimationNode.h
src/stateestimation/PTAM/ATANCamera.h
src/stateestimation/PTAM/Bundle.h
src/stateestimation/PTAM/customFixes.h
src/stateestimation/PTAM/HomographyInit.h
src/stateestimation/PTAM ... (more) |