Skip to content
This repository was archived by the owner on Feb 21, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/tools/uav_viewer/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ void MainWindow::setSpeeds(Ice::CommunicatorPtr ic){

Ice::PropertiesPtr prop = ic->getProperties();

this->max_x = std::atof( prop->getPropertyWithDefault("UAVViewer.Xmax", "0.3").c_str() );
this->max_y = std::atof( prop->getPropertyWithDefault("UAVViewer.Ymax", "0.3").c_str() );
this->max_z = std::atof( prop->getPropertyWithDefault("UAVViewer.Zmax", "0.3").c_str() );
this->max_yaw = std::atof( prop->getPropertyWithDefault("UAVViewer.Yawmax", "0.3").c_str() );
this->max_x = std::atof( prop->getPropertyWithDefault("UAVViewer.Xmax", "3").c_str() )/10;
this->max_y = std::atof( prop->getPropertyWithDefault("UAVViewer.Ymax", "3").c_str() )/10;
this->max_z = std::atof( prop->getPropertyWithDefault("UAVViewer.Zmax", "3").c_str() )/10;
this->max_yaw = std::atof( prop->getPropertyWithDefault("UAVViewer.Yawmax", "3").c_str() )/10;
}

void MainWindow::initButtons(){
Expand Down
3 changes: 3 additions & 0 deletions src/tools/uav_viewer/sensors/sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Sensors::Sensors(Ice::CommunicatorPtr ic)
try{
/*cast to CMDVelPrx*/
cmdprx = jderobot::CMDVelPrx::checkedCast(basecmd);
std::string temp;

if (0==cmdprx)
throw "CMDVel -> Invalid proxy";

Expand Down Expand Up @@ -126,6 +128,7 @@ void Sensors::sendVelocitiesToUAV(float vx,float vy,float vz,float roll,float pi
{
mutexDrone.lock();
jderobot::CMDVelDataPtr vel=new jderobot::CMDVelData();

vel->linearX=vx;
vel->linearY=vy;
vel->linearZ=vz;
Expand Down
8 changes: 8 additions & 0 deletions src/tools/uav_viewer/uav_viewer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ UAVViewer.CMDVel.Proxy=ardrone_cmdvel:default -h 0.0.0.0 -p 9995
UAVViewer.Navdata.Proxy=ardrone_navdata:default -h 0.0.0.0 -p 9996
UAVViewer.Extra.Proxy=ardrone_extra:default -h 0.0.0.0 -p 9994



# Following values will be divided by 10 to be used (3 --> 0.3 m/s) because atof doesn't work well (Truncates the decimal part)
UAVViewer.Xmax=3
UAVViewer.Ymax=3
UAVViewer.Zmax=3
UAVViewer.Yawmax=3

10 changes: 6 additions & 4 deletions src/tools/uav_viewer/uav_viewer_simulated.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ UAVViewer.Pose3D.Proxy=Pose3D:default -h 0.0.0.0 -p 9000
UAVViewer.CMDVel.Proxy=CMDVel:default -h 0.0.0.0 -p 9000
UAVViewer.Navdata.Proxy=Navdata:default -h 0.0.0.0 -p 9000
UAVViewer.Extra.Proxy=Extra:default -h 0.0.0.0 -p 9000
UAVViewer.Xmax=10
UAVViewer.Ymax=10
UAVViewer.Zmax=10
UAVViewer.Yawmax=10

# Following values will be divided by 10 to be used (3 --> 0.3 m/s) because atof doesn't work well (Truncates the decimal part)
UAVViewer.Xmax=100
UAVViewer.Ymax=100
UAVViewer.Zmax=100
UAVViewer.Yawmax=100