Giter VIP home page Giter VIP logo

dune's People

Contributors

anaezes avatar bernardo-gabriel avatar cgagner avatar edrdo avatar filipferr avatar jffortuna avatar joaopmacosta avatar joaoteixiera avatar josebraga avatar jqcorreia avatar kmolima avatar krisgry avatar krisklau avatar luis109 avatar margaridacf avatar mariacosta avatar maribeiro avatar mcpca avatar mortenfyhn avatar oysstu avatar paulosousadias avatar pdcalado avatar pmfg avatar rasmartins avatar rmsc avatar rsaez-itaca avatar tiagocr avatar tsmarques avatar xbogas avatar zepinto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dune's Issues

Input requested: print of parameter( groups)

Hi,
We have been discussing two parameter-related changes that we would like to have some input on:

  1. It is very useful to print parameters when they are changed, for timestamping user-input events (change of tuning parameters, activation of some feature, etc). A nice way to initialize this from the task would be something like:
    param("Awesome param").defaultValue("42").printOnChange(true, debugLevel="Debug")

  2. Another, related, change is to add the notion of a group of parameters; when changing the P-gain of a controller, it makes for less bookkeeping if the D- and I-gains are printed at the same time. Could be added by e.g. param("Awesome param").defaultValue("42").group("yawPID")

I know that it is possible to reconstruct the parameters from the setEntityParameter message, but it only tracks the changes, not the current status, which again calls for a lot of bookkeeping.

Both of these changes require changes to the core DUNE functionality, so I wanted to discuss them here first.

  1. The printing could be added in this if in the set-function in ParameterTable:
    if (parameter->commit())
    parameter->setChanged();

    by adding something like
    if (parameter.printOnChange && parameter.debuglevel == m_task->getDebugLevel() ).
    This will require the ParameterTable class to have a member variable that is a pointer to its class, to be able to print. One thing that is not clear to me yet is how the changes should be printed.
  • should the printOnChange function also take a print string as argument (like "%s was set to %f" when printing a float), or should this be detected from the type of the variable?
  • should the debug/spew/trace functions be called explicitly (to keep a clean interface), or just mimic the code:
    if (m_debug_level < DEBUG_LEVEL_DEBUG)
    return;
    std::va_list ap;
    va_start(ap, format);
    log(IMC::LogBookEntry::LBET_DEBUG, format, ap);
    va_end(ap);
  1. To add the group notion, one could add m_groups, which is a map from a string (group name) to a vector of parameters in that group. The parameter class would also need to add m_group. Then, after the above suggested if-statement, one would loop through all the parameters from the same group as the parameter, and print them all. Something like

group = m_groups.find(parameter.group); for(itr_group = group.second.begin(); itr_group != group.second.end(), ++itr_group) print

What do you think about this? As you notice, the changes are not major, but they are operating on some core DUNE classes. Very open for inputs before we start the implementation :) At this stage I have only looked through the code to plan the process, so there might be something that I have not considered.

Fix AppVeyor build

The AppVeyor builds have been broken since April last year. As discussed in today's meeting I'll open this issue to make the case more visible.

Windows compilation

Currently, DUNE fails to compile in windows for trying to use 'unsigned long long' types:

libSimulators.StreamVelocity.a(ModelDataStreamGenerator.cpp.obj):ModelDataStreamGenerator.cpp:(.text+0x62b): undefined reference to `std::vector<unsigned long long, std::allocator<unsigned long long> > DUNE::Parsers::HDF5Reader::getAttribute<unsigned long long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' collect2: error: ld returned 1 exit status.

MinGW cross-compilation toolchain (for testing):

Dune build in Windows doesn't work

Hey,
I'm trying to build dune on my windows 10 pro 20H2 computer. I tried both dune 2.6.1 and 2022-04.1
I understand the only way to do that in windows is through the cmake gui and visual studio builder.

When trying I encounter this:
CMake Error: Cannot open file for write: C:/Program Files/CMake/bin/CMakeCache.txt.tmpf09df
CMake Error: Unable to (re)create the private pkgRedirects directory:
C:/Program Files/CMake/bin/CMakeFiles/pkgRedirects
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. C:/Program Files/CMake/bin/CMakeCache.txt
CMake Error: : System Error: No such file or directory

It would be great to get the build bin files for windows if possible and no other solution is available.

Thanks. Appreciate any assistance.

Producer task

Hi,

I am trying to run the producer task of the Wiki, when I run the producer, my output is not like the example:

[2016/01/16 12:05:26] - MSG [Transports.FTP] >> listening on xxx.xxx.xxx.xxx:30021
[2016/01/16 12:05:26] - MSG [Transports.HTTP] >> starting
[2016/01/16 12:05:26] - MSG [Transports.LogBook] >> starting
[2016/01/16 12:05:26] - MSG [Transports.HTTP] >> listening on 0.0.0.0:8080
[2016/01/16 12:05:26] - MSG [Transports.Logging] >> starting
[2016/01/16 12:05:26] - MSG [Tutorials.TempProd] >> starting
[2016/01/16 12:05:26] - MSG [Transports.Logging] >> log started '20160116/120526'

Not appears "[Transports.HTTP] >> creating server on port 8080" like the example, it seems to be running as a consumer. Ini and cpp files are like the example.

Plan.Engine: Segfault when sending invalid plan

Hi,

When one sends a plan containing a transition to a maneuver ID that does not exists, a seg-fault occurs. See e.g. the following snippet to construct a dummy plan:

// Create the maneuver
IMC::Goto goto_man;
goto_man.lat = 10.0;
goto_man.lon = 60.0;
goto_man.z   = 10;
goto_man.z_units = IMC::Z_ALTITUDE;
goto_man.speed = 10;
goto_man.speed_units = IMC::SUNITS_METERS_PS;

IMC::PlanManeuver* pman1 = new IMC::PlanManeuver();
IMC::InlineMessage<IMC::Maneuver> pman1_inline;
pman1_inline.set(goto_man);
pman1->maneuver_id = "1";
pman1->data = pman1_inline;

// Prepare maneuvers
IMC::MessageList<IMC::PlanManeuver> manlist;
manlist.push_back(pman1);



// Set up transitions
IMC::PlanTransition* transition = new IMC::PlanTransition;
transition->source_man = "1";
transition->dest_man   = "2";

// Prepare transitions
IMC::MessageList<IMC::PlanTransition> translist;
translist.push_back(transition);

// Prepare the Plan Specification
IMC::PlanSpecification plan;
plan.description = "A net recovery test plan";
plan.plan_id = "NetRecoveryTest";
plan.start_man_id = "1";
plan.maneuvers = manlist;
plan.transitions = translist;

IMC::InlineMessage<IMC::Message> inline_planSpecification;
inline_planSpecification.set(plan);

// Create planControl
IMC::PlanControl planCtrl;
planCtrl.op = IMC::PlanControl::PC_START;
planCtrl.type = IMC::PlanControl::PC_REQUEST;
planCtrl.plan_id = "NetRecoveryTest";
planCtrl.request_id = 10;


// Apply plan specification
planCtrl.arg = inline_planSpecification;

dispatch(planCtrl);

My backtrace:

#0  0x00007ffff6f9f16d in std::string::compare(char const*) const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00000000007c7d6a in std::operator==<char, std::char_traits<char>, std::allocator<char> > (__lhs=..., 
    __rhs=0xcf9c63 "_done_") at /usr/include/c++/4.8/bits/basic_string.h:2521
#2  0x000000000091613c in Plan::Engine::Plan::sequenceNodes (this=0x7fffcc000bc0)
    at /home/krisklau/uavlab/dune/src/Plan/Engine/Plan.cpp:518
#3  0x0000000000915c75 in Plan::Engine::Plan::secondaryParse (this=0x7fffcc000bc0, cinfo=..., ps=..., 
    imu_enabled=false, state=0x11dfcb0) at /home/krisklau/uavlab/dune/src/Plan/Engine/Plan.cpp:454
#4  0x0000000000914b1e in Plan::Engine::Plan::parse (this=0x7fffcc000bc0, supported_maneuvers=0x11dfc40, 
    cinfo=..., ps=..., imu_enabled=false, state=0x11dfcb0)
    at /home/krisklau/uavlab/dune/src/Plan/Engine/Plan.cpp:127
#5  0x000000000090e6da in Plan::Engine::Task::parsePlan (this=0x11df810, plan_startup=true, ps=...)
    at /home/krisklau/uavlab/dune/src/Plan/Engine/Task.cpp:747
#6  0x000000000090e035 in Plan::Engine::Task::loadPlan (this=0x11df810, plan_id=..., arg=0x7fffb0001c80, 
    plan_startup=true) at /home/krisklau/uavlab/dune/src/Plan/Engine/Task.cpp:667
#7  0x000000000090ef84 in Plan::Engine::Task::startPlan (this=0x11df810, plan_id=..., spec=0x7fffb0001c80, 
    flags=0) at /home/krisklau/uavlab/dune/src/Plan/Engine/Task.cpp:873
#8  0x000000000090dd4c in Plan::Engine::Task::processRequest (this=0x11df810, pc=0x7fffb0001c20)
    at /home/krisklau/uavlab/dune/src/Plan/Engine/Task.cpp:624
#9  0x000000000090db47 in Plan::Engine::Task::consume (this=0x11df810, pc=0x7fffb0001c20)
    at /home/krisklau/uavlab/dune/src/Plan/Engine/Task.cpp:598
#10 0x0000000000914409 in DUNE::Tasks::Consumer<Plan::Engine::Task, DUNE::IMC::PlanControl>::consume (
    this=0x11e2eb0, msg=0x7fffb0001c20) at /home/krisklau/uavlab/dune/src/DUNE/Tasks/Consumer.hpp:53
#11 0x0000000000898568 in DUNE::Tasks::Recipient::runCallBacks (this=0x11e0c60)
    at /home/krisklau/uavlab/dune/src/DUNE/Tasks/Recipient.cpp:109
#12 0x0000000000898476 in DUNE::Tasks::Recipient::waitForMessages (this=0x11e0c60, timeout=1)
    at /home/krisklau/uavlab/dune/src/DUNE/Tasks/Recipient.cpp:88
---Type <return> to continue, or q <return> to quit---
#13 0x00000000007e44df in DUNE::Tasks::Task::waitForMessages (this=0x11df810, timeout=1)
    at /home/krisklau/uavlab/dune/src/DUNE/Tasks/Task.hpp:487
#14 0x000000000090fd31 in Plan::Engine::Task::onMain (this=0x11df810)
    at /home/krisklau/uavlab/dune/src/Plan/Engine/Task.cpp:1142
#15 0x000000000089ec5f in DUNE::Tasks::Task::run (this=0x11df810)
    at /home/krisklau/uavlab/dune/src/DUNE/Tasks/Task.cpp:368
#16 0x00000000007ec0fa in dune_concurrency_thread_entry_point (data=0x11df810)
    at /home/krisklau/uavlab/dune/src/DUNE/Concurrency/Thread.cpp:88
#17 0x00007ffff79bc182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#18 0x00007ffff6a0447d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Kristian

Possible bug in PathController, now that EstimatedState.z == 0

Hi,
We have had some problems with the longitudinal path controllers, and the start of a plan, so I did some digging through the PathController code, and found a strange line that I would like to discuss.

We are using LOS guidance in the longitudinal plane, which uses TrackingState start.z to create a line to the first WP. However, start.z is now zero until the first WP is reached. I believe that this issue has risen after the change to updating height and not z in EstimatedState. A change that seems to solve the problem for me is by changing

m_pcs.start_z = m_estate.z;

to m_pcs.start_z = m_estate.height - m_estate.z

I can reproduce this very well locally, but that is through the use of our longitudinal path controllers. I could not find any longitudinal PathControllers (Path/Height is a periodic task, and therefore does not have this problem). If you have any suggestions as to how I can reproduce this with any LSTS controllers, I'll happily try :) (Seems like ts.start.z is not used anywhere but in our code?)

Dune fails to build

Dune fails to build because of the following error:

CMake Error at cmake/Compiler.cmake:78 (list):
list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
cmake/Macros.cmake:41 (dune_probe_cxx)
cmake/Macros.cmake:82 (DUNE_PROBE_SYSTEM)
CMakeLists.txt:72 (include)

I am using Fedora 26 with gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2) and cmake version 3.9.1

Transports.Seatract - Compilation erro in Visual Studio

Hello,
Just wanted to let you know that to compile Dune in Windows Visual Studio you have to add to the Transports.Seatrack Task "#include ".
Otherwise you get an error std::back_inserter

Just a heads up.

Regards,
Andrรฉ

Using database for storing IMC messages instead of gziped LSF

Hello,

I was wondering, that IMC messages in terms of sensor data will be stored as gziped LSF file instead of using the build in SQLite database. Are there certain reasons for avoiding the database? If im right, SQLite is only used for mission planning currently.

Transports.UDP multi-bind in onUpdateParameters

If the parameters in UDP.Transports are changed (for instance, setting new static destinations to dynamically handle inter-vehicle communication), the task re-binds on all messages, causing duplicate message consumes.

bind(this, m_args.messages);

An easy solve is to only bind on first call, which is how we've done it internally here for some time.

CPU times overflows ?

I'm thinking of the vars in Resources::getProcessorUsage.
What happens if the tmp var that stores the /proc/stat values overflow ? I guess you could get some large values on a long running system.
When doing the diff between new_CPU and old_CPU you'll get funny results...
Or even when computing CPU total in Core::cpuTotal().
Or am I missing something ?

connect socket function does not return successfully for nonblocking sockets

In Windows the connect socket function does not return successfully for nonblocking sockets. It returns the 10035 error code (WSAEWOULDBLOCK). The problem appears when TCP.Client task tries to connect with remote server. TCP.Client destroyes the socket and create (connect) it again so the problem cannot be solved. A quick but not corect solution that i used was

  1. to handle this error code
  2. to leave it some time (sleep) and try again (connect) and check if the error code change to WSAEALREADY, WSAEISCONN

http://msdn.microsoft.com/en-us/library/windows/desktop/ms737625(v=vs.85).aspx

MSG_SEND macro conflict

Apparently the MSG_SEND enum is already defined in the socket.h header, simply changing the name solves the error.

../dune/src/Transports/Radio/Telemetry.hpp:67:36: error: 
      expected unqualified-id
        m_tx_mesg.state = MsgState::MSG_SEND;
                                    ^
/usr/include/sys/socket.h:564:18: note: expanded from macro 'MSG_SEND'
#define MSG_SEND        0x1000          /* Send the packet in so_temp */

Algorithms/Base64: Windows compilation

The regex.h dependency in Algorithms/Base64.cpp is not available on Windows. Regex was added to the standard library in C++11, and can be considered as a replacement when C++11/14 is put into use.

Not a high priority issue, but having Windows compatibility is good in general for student activities and DUNE wrappers for equipment running Windows.

  • ร˜ystein

Unnecessary check of isActive in Maneuvers/Maneuver consumes

Hi,
Did some digging in the Maneuvers/Maneuver, and found that bind is defined such that the consume function is only called if the task is active:

bind(T* task_obj, bool always = false)
{
if (always)
{
Task::bind<M>(task_obj);
}
else
{
void (Maneuver::* func)(const M*) = &Maneuver::consumeIfActive<M, T>;
Task::bind<M>(this, func);
}
}

Then I discovered that the consume functions of PathControlState and StopManeuver still check if the task is active:

Maneuver::consume(const IMC::PathControlState* pcs)
{
if (!isActive())
return;

and
Maneuver::consume(const IMC::StopManeuver* sm)
{
(void)sm;
if (isActive())
{
requestDeactivation();
IMC::ManeuverControlState mcs;
mcs.state = IMC::ManeuverControlState::MCS_STOPPED;
mcs.info = "stopped";
mcs.eta = 0;
dispatch(mcs);
}

which should not be necessary (unless I'm missing something?).

Segfault in Seatrac Task because ticket pointer is not initialized.

Segfault in Seatrac Task because ticket pointer is not initialized.

The src/Trasnports/Seatrac/Task.cpp has a member variable Ticket* m_ticket. However, that point is not initialized to NULL. This causes a segfault on some systems in sendTxStatus(...) because the ticket is used without being initialized. Normally, the check for NULL in clearTicket(...) would have prevented this from happening.

Run DUNE on GLUED

Hi, I have a Raspberry Pi 2 with GLUED "lauv-aux-rpi-testbed", ยฟthe correct form to run DUNE is copying the folder inside the sd and run the commands from the serial terminal?

Ardupilot-task: Bug in down velocity

The minus sign in the following line should not be there:

m_estate.vz = -1e-02 * gp.vz;

According to mavlink, this is already given in down, as required by the EstimatedState message

typedef struct __mavlink_global_position_int_t {
uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/
int32_t lat; /*< Latitude, expressed as degrees * 1E7*/
int32_t lon; /*< Longitude, expressed as degrees * 1E7*/
int32_t alt; /*< Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)*/
int32_t relative_alt; /*< Altitude above ground in meters, expressed as * 1000 (millimeters)*/
int16_t vx; /*< Ground X Speed (Latitude, positive north), expressed as m/s * 100*/
int16_t vy; /*< Ground Y Speed (Longitude, positive east), expressed as m/s * 100*/
int16_t vz; /*< Ground Z Speed (Altitude, positive down), expressed as m/s * 100*/
uint16_t hdg; /*< Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/
}) mavlink_global_position_int_t;

This bug also affects the body-frame velocities, as they are computed from the NED ones.

Is the project dead?

There are countless open pull requests and no one seems to be paying attention. Are there any active maintainers around?

LOS passing WP

Hi,
We are having a LOS problem that I would like to discuss with you to find the best solution.

The problem arises when two WPs are close together, the time of arrival factor is relatively large, and the UAV has to make a sharp turn, see the attached figure.

  1. The UAV heads towards WP1
  2. Upon the switch to WP2, the angle of the line WP1->WP2 is set as the desired heading
  3. If WP2 is so close to WP1 that the UAV can not reach the line before WP2, it will along the line "forever" and never switch to WP3

los issue

So; How can we fix this?
First its a matter of detection:

  • Currently, we are detecting this in LOSnSMC by checking that we have passed the current WP (track_pos.x - track_length is larger than some threshold) and the course error is small.
  • However, perhaps it should be made more general by e.g. adding a detection in PathController::updateTrackingState to check for an increasing ETA (over some period of time)?

Then its a matter of handling the problem:

  • Currently, we do a signalError which leaves the UAV in an error state
  • At least in the specific case shown in the picture it would be more intuitive to do a signalCompletion and move on to WP3
  • For some more critical cases it might be necessary to "try again", but I have not looked into this

Looking forward for input on this! I have already discussed this with @jffortuna and @krisklau. I'll happily to a pull request.

PathController: Get next maneuver

Hi,
For vehicles with a limited turning radius, it makes sense to consider the maximal turning radius when switching to the next maneuver. To enable a smooth transition between two straight lines, I would like to add the possibility to dynamically adjust the TimeFactor based on how sharp the turn is: transition earlier the more acute the angle between the two straight lines is. From the PathController side, this can be achieved by overloading the getTimeFactor function, but the problem is that it will require knowledge of the next maneuver before the transition is made. What is the best way to achieve this?

I've looked into this, and have arrived at the following suggestion:

  • When PathController starts a new maneuver, also have it request the next maneuver. This may be done by a planControl request, and parse the returning arg to find the maneuver after the current man_id (obtained through consumption of PlanControlState?).
  • make the information about the next maneuver easily available for child PathControllers, by adding the function getNextManeuver().
  • This will enable overloading of getTimeFactor by:
    • Finding the angle between the current maneuver and the next (by calling getNextManeuver())
    • inscribe a circle with radius equivalent to the minimal turning radius
    • Find the distance/time between the intersection of the circle and the current line, to determine the appropriate TimeFactor for transitioning to the next maneuver

How does this sound? Do you agree that this is the most straight forward approach? I know that this will introduce some (minimally invasive) changes to the "holy" PathController base class, so I would like some input before I potentially start this process.

Thanks!

Handling of announce messages does not update node's position

// In file LimitedComms.hpp there is the method
// position of node that send an announchment handled correctly only the first time. Then it is ignored. See comment
void
setNodePosition(unsigned id, double lat, double lon, double alt)
{
ScopedRWLock l(m_positions_lock, true);
std::map<unsigned, NodePosition>::iterator itr = m_node_positions.find(id);
bool within_range = isReachable(lat, lon, alt);
if (itr == m_node_positions.end())
{
NodePosition pos;
pos.lat = lat;
pos.lon = lon;
pos.hae = alt;
pos.visible = within_range;

      m_node_positions[id] = pos;
    }                                              // !!! NOT UPDATED IN CASE THAT WE HAVE A NODE !!!

    m_node_positions[id].visible = within_range;
  }

No new PRs

FYI: seeing as I/we have so many hanging PRs I do not see the point of making more PRs. At least not for new features. This applies for all LSTS tools.

Instead, I suggest that you reach out if you suspect that I/we have new features or bug fixes. Not optimal, but neither is spending time on work that is not appreciated.

PathController: Undesired behaviour for (very) small Time of Arrival factors

Hi,
When flying a plan consisting of Goto maneuvers with a ToA factor of 1 second, I get some undesired behaviour: instead of using the height of the end of the previous maneuver as the starting height, PathController uses the current height of the UAV. For example, when flying Gotos with height of 250 and 200 m, it flies towards the first Goto. When switching to the next Goto, the start_z in PathControlState is e.g. 248.42 m (the height the UAV had when it reached the first Goto), instead of 250m. When running the exact same plan with ToA=3, I get the expected behaviour.

I believe that this is caused by the following if:

else if ((!m_tracking && now - m_ts.end_time > 1) ||
(!m_ts.nearby && !m_ts.loitering) ||
(dpath->flags & IMC::DesiredPath::FL_DIRECT) != 0)
{

From printouts, I see that the if is entered since m_ts.nearby is false, which I find a bit strange since the DesiredPath message is sent (meaning that we have been nearby, so that the maneuver complete has been signaled). I've tried to trace this to its source, but I'm currently in a big rabbit hole, seeking advice :)

Inputs are appreciated. Do you agree that this is a bug? Ideas to what I should check?

I will continue to dig once my motivation has recovered.

Math::average may overflow

average(Type* a, uint32_t size)

TEST_CASE("average")
{
{
// Chars
char array1[] = { (char)100, (char)100, (char)100 };
char array2[] = { (char)100, (char)110, (char)120 };
char array3[] = { (char)5, (char)1, (char) 6};
char array4[] = { (char)-5, (char)0, (char) 5};
char array5[] = { (char)-0, (char)-5, (char) -10};
char size = 3;

  REQUIRE(average(array1, size) == Approx(100));
  REQUIRE(average(array2, size) == Approx(110));
  REQUIRE(average(array3, size) == Approx(4));
  REQUIRE(average(array4, size) == Approx(0));
  REQUIRE(average(array5, size) == Approx(-5));
}

}

Question about Simulators.USBL

Hi,
i wanna simulate an USBL Modem and i use the task Simulators.USBL (+ UAN and AcousticModem) for that. In the method task() there is:

if (m_ent.state != IMC::EntityState::ESTA_NORMAL)
          return;  // Home ref not setup

But m_ent.state is always zero and the state will never change in this task. Am I making a mistake somewhere?

"Bottom Track" entity label conflict when multiple "PathController" derivative classes are used

Bug detected in master when a second derivative class of the "PathController" is initialised.
Bug initially detected in the branch "feature/formationflight", hash: 5a9cbe2, when a UAV with a second "Control.Path.Aerosonde" is initialised, in this case "Control.Path.Aerosonde/Leader".

Effects:
"Control.Path.Aerosonde/Leader" crashes due to a "Bottom Track" entity label conflict:
"ERR [Control.Path.Aerosonde/Leader] >> an unique id was already reserved for entity label: Bottom Track".

Conditions to replicate the bug effects:

  • Run "./dune -c x8-04 -p Simulation", or for x8-02 and x8-03

Current diagnostic:
The "PathController" class reserves the unique id of the "Bottom Track" entity with an hardcoded entity label: (line 286) m_bt_entity = reserveEntityDUNE::Entities::BasicEntity("Bottom Track"). This happens independently of the vehicle type DUNE is controlling or the existence of more "PathController" type tasks.

Suggested fix:

  • Change lines 286 and 287 to:

    if ( m_btd.enabled )
    {
    m_bt_entity = reserveEntityDUNE::Entities::BasicEntity( m_btd.label );
    m_btd.args.entity = m_bt_entity;
    }

  • Add a parameter to define the Bottom Track label:

    param("Bottom Track -- Label", m_btd.label)
    .defaultValue("Bottom Track")
    .description("Bottom track entity label");

This fix is implemented in branch bug/3290.

Possible issues with the fix:
If the Bottom Track is disabled when the system is initialized, the Bottom Track entity id won't be reserved. This might cause problems if there is an attempt to enable the Bottom Track later. To get around that issue do we need an extra parameter like "Bottom Track -- Available"?

General architecture issue:
Shouldn't "Bottom Track" be an independent derivative class of the "PathController" and run in parallel to the horizontal path controller, as the "Height" controller does in the UAVs? Why should any vehicle that runs a "PathController" have a "Bottom Track" initialized? It might be usefull for AUVs, ROVs and UAVs, but it is probably not useful for ASVs or UGVs.

Utils fails to create an MD5 sum on RHEL for the IMC Generator

Utils fails to create an MD5 sum on RHEL for the IMC Generator.

RHEL prevents the use of MD5 sum for security purposes. The programs/generators/imc/utils.py calls hashlib.md5(), which fails. RHEL requires hashlib use the usedforsecurity=False option.

Task Transports.FTP fails in Windows

Branch: master (hash: e30cb3c)
DUNE test configuration: x8-03 in โ€œSimulationโ€ mode.

Task Transports.FTP dies when DUNE is ran in Windows. If the task is disabled the error disappears.

Bus error: 10

Hello,
when trying to execute a UAV simulation, upon connecting to the HTTP host, I encounter the following error:
Bus error: 10 (core dumped)
What could be the reason for a Bus failure and set. fault?
Thanks

DUNE/Hardware/LUCL: Possible buffer overflow

Hi,

I think this line might cause a buffer overflow?

In the lines above it we check if the data we're trying to write is smaller than 64 bytes

if (data_size > c_data_max)
    throw std::runtime_error("maximum data size exceeded");

but then the total buffer size for the message is only 32

uint8_t msg[32] = {c_sync, (uint8_t)(data_size + 1), cmd};
std::memcpy(msg + 3, data, data_size);

C++11 as standard

Hi,

I was wondering if there has been any discussion about using C++11 as default for DUNE? We have been using it internally for a while, and several of the features are really useful when working with DUNE.

Kristian

Setting LBL Measurement Noise Index overflow

        void
        onUpdateParameters(void) override
        {
          BasicNavigation::onUpdateParameters();

          // Initialize Process and Measure Covariances matrices
          m_kal.setProcessNoise(STATE_X, m_process_noise[PN_POSITION]);
          m_kal.setProcessNoise(STATE_Y, m_process_noise[PN_POSITION]);
          m_kal.setProcessNoise(STATE_PSI, m_process_noise[PN_PSI]);
          m_kal.setProcessNoise(STATE_R, m_process_noise[PN_YAWRATE]);
          m_kal.setProcessNoise(STATE_U, m_process_noise[PN_SPEED]);
          m_kal.setProcessNoise(STATE_V, m_process_noise[PN_SPEED]);
          m_kal.setProcessNoise(STATE_R_BIAS, m_process_noise[PN_YRATE_BIAS]);
          m_kal.setProcessNoise(STATE_PSI_BIAS, 0.0);

          m_kal.setMeasurementNoise(OUT_U, m_measure_noise[MN_U]);
          m_kal.setMeasurementNoise(OUT_V, m_measure_noise[MN_V]);
          m_kal.setMeasurementNoise(OUT_PSI, m_measure_noise[MN_PSI]);
          m_kal.setMeasurementNoise(OUT_R, m_measure_noise[MN_YAWRATE]);
          m_kal.setMeasurementNoise(OUT_GPS_X, m_args.gps_noise[GPS_GOOD_IX]);
          m_kal.setMeasurementNoise(OUT_GPS_Y, m_args.gps_noise[GPS_GOOD_IX]);

          for (unsigned i = 0; i < m_ranging.getSize(); i++)
            m_kal.setMeasurementNoise(NUM_OUT + i, m_measure_noise[MN_LBL]);

          if (m_dead_reckoning)
          {
            // Position process noise covariance value if IMU is available.
            m_kal.setProcessNoise(STATE_X, m_args.pos_noise);
            m_kal.setProcessNoise(STATE_Y, m_args.pos_noise);
            m_kal.setProcessNoise(STATE_PSI_BIAS, m_process_noise[PN_PSI_BIAS]);

            // LBL noise.
            for (unsigned i = 0; i < m_ranging.getSize(); i++)
              m_kal.setMeasurementNoise(NUM_OUT + i, m_args.lbl_noise);
          }
        }

The Value of NUM_OUT as enum is 6, so when the loop runs for the transponders, if it even run atleast once the Index in which the LBL measurement noise is updated is out of bounds. Since the size of the Measurement Noise covariance is 6 x 6.

The loop part

 for (unsigned i = 0; i < m_ranging.getSize(); i++)
            m_kal.setMeasurementNoise(NUM_OUT + i, m_measure_noise[MN_LBL]);

The EKF Code

void
    KalmanFilter::setMeasurementNoise(short in, double value)
    {
      if (in >= m_r.rows())
        throw std::runtime_error(DTR("invalid index"));

      m_r(in, in) = value;
    }

I am not sure if i am correct. Pls Correct me if I am wrong.

Using IMC in own C++ Project

Hello,
i want to use imc in an own c++ Project to get and send Messages from/to dune. How is that possible. I can only find a imclib for Java. Is there an imc- library for using in c++ and where can i find that?

Thanks for helping me.
Best regards
Tobias

Error building Dune on Windows CMake with VS2019

Hey,
I'm trying to build dune on my windows 10 pro 20H2 computer on dune-branch-20180710-eurready4os-cork tag.
Visual Studio 2019
cmake version 3.24.2
g++ version 10.3.0

Accordingly to wiki I understand the only way to do that in windows is through the cmake gui and visual studio builder.

In addition I don't find any make.exe in my MinGW/bin.

When pressing configure button the build finishes but with this error:

CMake Deprecation Warning at CMakeLists.txt:31 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
The C compiler identification is MSVC 19.29.30146.0
The CXX compiler identification is MSVC 19.29.30146.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done


*** Probing Compiler ***


Looking for __INTEL_COMPILER
Looking for __INTEL_COMPILER - not found
Looking for __SUNPRO_C
Looking for __SUNPRO_C - not found
Looking for clang
Looking for clang - not found
Looking for GNUC
Looking for GNUC - not found
Looking for _MSC_VER
Looking for _MSC_VER - found


*** Probing Target CPU ***


Performing Test DUNE_SYS_HAS___AMD64__
Performing Test DUNE_SYS_HAS___AMD64__ - Failed
Performing Test DUNE_SYS_HAS___AMD64
Performing Test DUNE_SYS_HAS___AMD64 - Failed
Performing Test DUNE_SYS_HAS__AMD64_
Performing Test DUNE_SYS_HAS__AMD64_ - Failed
Performing Test DUNE_SYS_HAS___X86_64__
Performing Test DUNE_SYS_HAS___X86_64__ - Failed
Performing Test DUNE_SYS_HAS___X86_64
Performing Test DUNE_SYS_HAS___X86_64 - Failed
Performing Test DUNE_SYS_HAS__M_X64
Performing Test DUNE_SYS_HAS__M_X64 - Success
Performing Test ARCH64
Performing Test ARCH64 - Failed


*** Probing Target CPU Optimizations ***


Performing Test DUNE_CPU_VARIANT_ATOM
Performing Test DUNE_CPU_VARIANT_ATOM - Failed
Performing Test DUNE_CPU_VARIANT_GEODE
Performing Test DUNE_CPU_VARIANT_GEODE - Failed


*** Probing Operating System ***


Looking for ANDROID
Looking for ANDROID - not found
Performing Test OS_LINUX24
Performing Test OS_LINUX24 - Failed
Looking for linux
Looking for linux - not found
Looking for rtems
Looking for rtems - not found
Looking for ECOS
Looking for ECOS - not found
Looking for _WIN32
Looking for _WIN32 - found
Looking for __WINPTHREADS_VERSION_MAJOR
Looking for __WINPTHREADS_VERSION_MAJOR - not found


*** Probing C/C++ Library ***


Performing Test LLVM_LIBC
Performing Test LLVM_LIBC - Failed
Looking for UCLIBC
Looking for UCLIBC - not found
Looking for BIONIC
Looking for BIONIC - not found
Looking for GLIBC
Looking for GLIBC - not found
Looking for _NEWLIB_VERSION
Looking for _NEWLIB_VERSION - not found
Looking for ECOS
Looking for ECOS - not found
Looking for __MINGW32_VERSION
Looking for __MINGW32_VERSION - not found
Looking for MINGW32
Looking for MINGW32 - not found
Looking for _MSC_VER
Looking for _MSC_VER - found


*** Probing System Libraries ***


Looking for clock_gettime in rt
Looking for clock_gettime in rt - not found
Looking for getch in ws2_32
Looking for getch in ws2_32 - found
Looking for getch in wsock32
Looking for getch in wsock32 - found
Looking for getch in iphlpapi
Looking for getch in iphlpapi - found
Looking for setsockopt in socket
Looking for setsockopt in socket - not found
Looking for pthread_self in pthread
Looking for pthread_self in pthread - not found
Looking for pow in m
Looking for pow in m - not found
Looking for inet_addr in xnet
Looking for inet_addr in xnet - not found
Looking for inet_ntop in nsl
Looking for inet_ntop in nsl - not found
Looking for dlopen in dl
Looking for dlopen in dl - not found
Looking for gettext in intl
Looking for gettext in intl - not found


*** Probing System Headers ***


Looking for C++ include cmath
CMake Warning (dev) at C:/CMake/share/cmake-3.24/Modules/CheckIncludeFileCXX.cmake:81 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

CMAKE_REQUIRED_LIBRARIES is set to:

ws2_32;wsock32;iphlpapi

For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
cmake/Headers.cmake:40 (check_include_file_cxx)
cmake/Headers.cmake:91 (dune_test_header)
cmake/Macros.cmake:47 (dune_probe_headers)
cmake/Macros.cmake:82 (DUNE_PROBE_SYSTEM)
CMakeLists.txt:72 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

Looking for C++ include cmath - found
Looking for C++ include math.h
Looking for C++ include math.h - found
Looking for C++ include cstdlib
Looking for C++ include cstdlib - found
Looking for C++ include cstring
Looking for C++ include cstring - found
Looking for C++ include string.h
Looking for C++ include string.h - found
Looking for C++ include cstdio
Looking for C++ include cstdio - found
Looking for C++ include stdio.h
Looking for C++ include stdio.h - found
Looking for C++ include cstdarg
Looking for C++ include cstdarg - found
Looking for C++ include memory
Looking for C++ include memory - found
Looking for C++ include tr1/memory
Looking for C++ include tr1/memory - not found
Looking for C++ include time.h
Looking for C++ include time.h - found
Looking for C++ include alloca.h
Looking for C++ include alloca.h - not found
Looking for C++ include arpa/inet.h
Looking for C++ include arpa/inet.h - not found
Looking for C++ include devctl.h
Looking for C++ include devctl.h - not found
Looking for C++ include dirent.h
Looking for C++ include dirent.h - not found
Looking for C++ include dlfcn.h
Looking for C++ include dlfcn.h - not found
Looking for C++ include fcntl.h
Looking for C++ include fcntl.h - found
Looking for C++ include inttypes.h
Looking for C++ include inttypes.h - found
Looking for C++ include linux/i2c-dev.h
Looking for C++ include linux/i2c-dev.h - not found
Looking for C++ include linux/i2c.h
Looking for C++ include linux/i2c.h - not found
Looking for C++ include linux/rtc.h
Looking for C++ include linux/rtc.h - not found
Looking for C++ include linux/input.h
Looking for C++ include linux/input.h - not found
Looking for C++ include linux/spi/spidev.h
Looking for C++ include linux/spi/spidev.h - not found
Looking for C++ include netdb.h
Looking for C++ include netdb.h - not found
Looking for C++ include signal.h
Looking for C++ include signal.h - found
Looking for C++ include stdint.h
Looking for C++ include stdint.h - found
Looking for C++ include sys/io.h
Looking for C++ include sys/io.h - not found
Looking for C++ include sys/ioctl.h
Looking for C++ include sys/ioctl.h - not found
Looking for C++ include sys/procfs.h
Looking for C++ include sys/procfs.h - not found
Looking for C++ include sys/signal.h
Looking for C++ include sys/signal.h - not found
Looking for C++ include sys/stat.h
Looking for C++ include sys/stat.h - found
Looking for C++ include sys/statfs.h
Looking for C++ include sys/statfs.h - not found
Looking for C++ include sys/sendfile.h
Looking for C++ include sys/sendfile.h - not found
Looking for C++ include sys/time.h
Looking for C++ include sys/time.h - not found
Looking for C++ include sys/timex.h
Looking for C++ include sys/timex.h - not found
Looking for C++ include sys/types.h
Looking for C++ include sys/types.h - found
Looking for C++ include sys/file.h
Looking for C++ include sys/file.h - not found
Looking for C++ include sys/wait.h
Looking for C++ include sys/wait.h - not found
Looking for C++ include sys/vfs.h
Looking for C++ include sys/vfs.h - not found
Looking for C++ include sys/statvfs.h
Looking for C++ include sys/statvfs.h - not found
Looking for C++ include sys/syscall.h
Looking for C++ include sys/syscall.h - not found
Looking for C++ include sys/reboot.h
Looking for C++ include sys/reboot.h - not found
Looking for C++ include termios.h
Looking for C++ include termios.h - not found
Looking for C++ include unistd.h
Looking for C++ include unistd.h - not found
Looking for C++ include windows.h
Looking for C++ include windows.h - found
Looking for C++ include direct.h
Looking for C++ include direct.h - found
Looking for C++ include winsock2.h
Looking for C++ include winsock2.h - found
Looking for C++ include mach-o/dyld.h
Looking for C++ include mach-o/dyld.h - not found
Looking for C++ include process.h
Looking for C++ include process.h - found
Looking for C++ include bsp.h
Looking for C++ include bsp.h - not found
Looking for C++ include sys/param.h
Looking for C++ include sys/param.h - not found
Looking for C++ include sys/mount.h
Looking for C++ include sys/mount.h - not found
Looking for C++ include linux/videodev2.h
Looking for C++ include linux/videodev2.h - not found
Looking for C++ include sched.h
Looking for C++ include sched.h - found
Looking for C++ include poll.h
Looking for C++ include poll.h - not found
Looking for C++ include ifaddrs.h
Looking for C++ include ifaddrs.h - not found
Looking for C++ include semaphore.h
Looking for C++ include semaphore.h - found
Looking for C++ include libintl.h
Looking for C++ include libintl.h - not found
Looking for C++ include syslog.h
Looking for C++ include syslog.h - not found
Looking for C++ include float.h
Looking for C++ include float.h - found
Performing Test DUNE_SYS_HAS_SYS_SOCKET_H
Performing Test DUNE_SYS_HAS_SYS_SOCKET_H - Failed
Performing Test DUNE_SYS_HAS_NETINET_IN_H
Performing Test DUNE_SYS_HAS_NETINET_IN_H - Failed
Performing Test DUNE_SYS_HAS_NETINET_TCP_H
Performing Test DUNE_SYS_HAS_NETINET_TCP_H - Failed
Performing Test DUNE_SYS_HAS_SYS_SELECT_H
Performing Test DUNE_SYS_HAS_SYS_SELECT_H - Failed
Performing Test DUNE_SYS_HAS_SYS_SYSCTL_H
Performing Test DUNE_SYS_HAS_SYS_SYSCTL_H - Failed
Performing Test DUNE_SYS_HAS_SYS_RESOURCE_H
Performing Test DUNE_SYS_HAS_SYS_RESOURCE_H - Failed
Performing Test DUNE_SYS_HAS_SYS_MMAN_H
Performing Test DUNE_SYS_HAS_SYS_MMAN_H - Failed
Performing Test DUNE_SYS_HAS_NET_IF_H
Performing Test DUNE_SYS_HAS_NET_IF_H - Failed
Performing Test DUNE_SYS_HAS_TIMEPPS_H
Performing Test DUNE_SYS_HAS_TIMEPPS_H - Failed
Performing Test DUNE_SYS_HAS_IPHLPAPI_H
Performing Test DUNE_SYS_HAS_IPHLPAPI_H - Success
Performing Test DUNE_SYS_HAS_WS2TCPIP_H
Performing Test DUNE_SYS_HAS_WS2TCPIP_H - Success
Performing Test DUNE_SYS_HAS_WS2SPI_H
Performing Test DUNE_SYS_HAS_WS2SPI_H - Success


*** Probing System Functions ***


Performing Test DUNE_SYS_HAS_STRNCPY_S
Performing Test DUNE_SYS_HAS_STRNCPY_S - Success
Performing Test DUNE_SYS_HAS_STRNCPY
Performing Test DUNE_SYS_HAS_STRNCPY - Success
Performing Test DUNE_SYS_HAS_VSNPRINTF
Performing Test DUNE_SYS_HAS_VSNPRINTF - Success
Performing Test DUNE_SYS_HAS_VSNPRINTF_S
Performing Test DUNE_SYS_HAS_VSNPRINTF_S - Failed
Performing Test DUNE_SYS_HAS_CLOSE
Performing Test DUNE_SYS_HAS_CLOSE - Failed
Performing Test DUNE_SYS_HAS_CLOSESOCKET
Performing Test DUNE_SYS_HAS_CLOSESOCKET - Success
Performing Test DUNE_SYS_HAS_PTHREAD_KEY_DELETE
Performing Test DUNE_SYS_HAS_PTHREAD_KEY_DELETE - Failed
Performing Test DUNE_SYS_HAS_PTHREAD_SIGMASK
Performing Test DUNE_SYS_HAS_PTHREAD_SIGMASK - Failed
Performing Test DUNE_SYS_HAS_PTHREAD_CONDATTR_SETCLOCK
Performing Test DUNE_SYS_HAS_PTHREAD_CONDATTR_SETCLOCK - Failed
Performing Test DUNE_SYS_HAS_SIGACTION
Performing Test DUNE_SYS_HAS_SIGACTION - Failed
Performing Test DUNE_SYS_HAS_MMAP
Performing Test DUNE_SYS_HAS_MMAP - Failed
Performing Test DUNE_SYS_HAS_MMAP64
Performing Test DUNE_SYS_HAS_MMAP64 - Failed
Performing Test DUNE_SYS_HAS_MLOCKALL
Performing Test DUNE_SYS_HAS_MLOCKALL - Failed
Performing Test DUNE_SYS_HAS_MUNLOCKALL
Performing Test DUNE_SYS_HAS_MUNLOCKALL - Failed
Performing Test DUNE_SYS_HAS_ROUND
Performing Test DUNE_SYS_HAS_ROUND - Success
Performing Test DUNE_SYS_HAS_LROUND
Performing Test DUNE_SYS_HAS_LROUND - Success
Performing Test DUNE_SYS_HAS_GETCWD
Performing Test DUNE_SYS_HAS_GETCWD - Failed
Performing Test DUNE_SYS_HAS__GETCWD
Performing Test DUNE_SYS_HAS__GETCWD - Success
Performing Test DUNE_SYS_HAS_FORMAT_MESSAGE
Performing Test DUNE_SYS_HAS_FORMAT_MESSAGE - Success
Performing Test DUNE_SYS_HAS_IOPERM
Performing Test DUNE_SYS_HAS_IOPERM - Failed
Performing Test DUNE_SYS_HAS_LOCALTIME
Performing Test DUNE_SYS_HAS_LOCALTIME - Success
Performing Test DUNE_SYS_HAS_LOCALTIME_R
Performing Test DUNE_SYS_HAS_LOCALTIME_R - Failed
Performing Test DUNE_SYS_HAS_GMTIME_R
Performing Test DUNE_SYS_HAS_GMTIME_R - Failed
Performing Test DUNE_SYS_HAS_CLOCK_NANOSLEEP
Performing Test DUNE_SYS_HAS_CLOCK_NANOSLEEP - Failed
Performing Test DUNE_SYS_HAS_NANOSLEEP
Performing Test DUNE_SYS_HAS_NANOSLEEP - Failed
Performing Test DUNE_SYS_HAS_CLOCK_GETTIME
Performing Test DUNE_SYS_HAS_CLOCK_GETTIME - Failed
Performing Test DUNE_SYS_HAS_GET_SYSTEM_TIME_AS_FILE_TIME
Performing Test DUNE_SYS_HAS_GET_SYSTEM_TIME_AS_FILE_TIME - Success
Performing Test DUNE_SYS_HAS_QUERY_PERFORMANCE_COUNTER
Performing Test DUNE_SYS_HAS_QUERY_PERFORMANCE_COUNTER - Success
Performing Test DUNE_SYS_HAS_GET_LAST_ERROR
Performing Test DUNE_SYS_HAS_GET_LAST_ERROR - Success
Performing Test DUNE_SYS_HAS_CREATE_WAITABLE_TIMER
Performing Test DUNE_SYS_HAS_CREATE_WAITABLE_TIMER - Success
Performing Test DUNE_SYS_HAS_GET_MODULE_FILE_NAME
Performing Test DUNE_SYS_HAS_GET_MODULE_FILE_NAME - Success
Performing Test DUNE_SYS_HAS_LOAD_LIBRARY
Performing Test DUNE_SYS_HAS_LOAD_LIBRARY - Success
Performing Test DUNE_SYS_HAS_TLS_ALLOC
Performing Test DUNE_SYS_HAS_TLS_ALLOC - Success
Performing Test DUNE_SYS_HAS_DLERROR
Performing Test DUNE_SYS_HAS_DLERROR - Failed
Performing Test DUNE_SYS_HAS_DLOPEN
Performing Test DUNE_SYS_HAS_DLOPEN - Failed
Performing Test DUNE_SYS_HAS_GETTIMEOFDAY
Performing Test DUNE_SYS_HAS_GETTIMEOFDAY - Failed
Performing Test DUNE_SYS_HAS_HTONL
Performing Test DUNE_SYS_HAS_HTONL - Success
Performing Test DUNE_SYS_HAS_HTONS
Performing Test DUNE_SYS_HAS_HTONS - Success
Performing Test DUNE_SYS_HAS_NTOHL
Performing Test DUNE_SYS_HAS_NTOHL - Success
Performing Test DUNE_SYS_HAS_NTOHS
Performing Test DUNE_SYS_HAS_NTOHS - Success
Performing Test DUNE_SYS_HAS_INET_ADDR
Performing Test DUNE_SYS_HAS_INET_ADDR - Success
Performing Test DUNE_SYS_HAS_INET_NTOA
Performing Test DUNE_SYS_HAS_INET_NTOA - Success
Performing Test DUNE_SYS_HAS_INET_ATON
Performing Test DUNE_SYS_HAS_INET_ATON - Failed
Performing Test DUNE_SYS_HAS_INET_NTOP
Performing Test DUNE_SYS_HAS_INET_NTOP - Failed
Performing Test DUNE_SYS_HAS_INET_PTON
Performing Test DUNE_SYS_HAS_INET_PTON - Failed
Performing Test DUNE_SYS_HAS_GETADDRINFO
Performing Test DUNE_SYS_HAS_GETADDRINFO - Success
Performing Test DUNE_SYS_HAS_LSTAT
Performing Test DUNE_SYS_HAS_LSTAT - Failed
Performing Test DUNE_SYS_HAS_STATFS64_DARWIN_LINUX
Performing Test DUNE_SYS_HAS_STATFS64_DARWIN_LINUX - Failed
Performing Test DUNE_SYS_HAS_POSIX_MKDIR
Performing Test DUNE_SYS_HAS_POSIX_MKDIR - Failed
Performing Test DUNE_SYS_HAS_CREATE_DIRECTORY
Performing Test DUNE_SYS_HAS_CREATE_DIRECTORY - Success
Performing Test DUNE_SYS_HAS_SELECT
Performing Test DUNE_SYS_HAS_SELECT - Success
Performing Test DUNE_SYS_HAS_LINUX_SENDFILE
Performing Test DUNE_SYS_HAS_LINUX_SENDFILE - Failed
Performing Test DUNE_SYS_HAS_SETTIMEOFDAY
Performing Test DUNE_SYS_HAS_SETTIMEOFDAY - Failed
Performing Test DUNE_SYS_HAS_SOCKET
Performing Test DUNE_SYS_HAS_SOCKET - Success
Performing Test DUNE_SYS_HAS_WSA_STARTUP
Performing Test DUNE_SYS_HAS_WSA_STARTUP - Success
Performing Test DUNE_SYS_HAS_WSA_CLEANUP
Performing Test DUNE_SYS_HAS_WSA_CLEANUP - Success
Performing Test DUNE_SYS_HAS_WSA_STRING_TO_ADDRESS
Performing Test DUNE_SYS_HAS_WSA_STRING_TO_ADDRESS - Success
Performing Test DUNE_SYS_HAS_WSA_IOCTL
Performing Test DUNE_SYS_HAS_WSA_IOCTL - Success
Performing Test DUNE_SYS_HAS_STAT
Performing Test DUNE_SYS_HAS_STAT - Success
Performing Test DUNE_SYS_HAS_STRERROR
Performing Test DUNE_SYS_HAS_STRERROR - Success
Performing Test DUNE_SYS_HAS_GNU_STRERROR_R
Performing Test DUNE_SYS_HAS_GNU_STRERROR_R - Failed
Performing Test DUNE_SYS_HAS_POSIX_STRERROR_R
Performing Test DUNE_SYS_HAS_POSIX_STRERROR_R - Failed
Performing Test DUNE_SYS_HAS_CREATE_FILE
Performing Test DUNE_SYS_HAS_CREATE_FILE - Success
Performing Test DUNE_SYS_HAS_READ_FILE
Performing Test DUNE_SYS_HAS_READ_FILE - Success
Performing Test DUNE_SYS_HAS_WRITE_FILE
Performing Test DUNE_SYS_HAS_WRITE_FILE - Success
Performing Test DUNE_SYS_HAS_GET_OVERLAPPED_RESULT
Performing Test DUNE_SYS_HAS_GET_OVERLAPPED_RESULT - Success
Performing Test DUNE_SYS_HAS_SET_COMM_STATE
Performing Test DUNE_SYS_HAS_SET_COMM_STATE - Success
Performing Test DUNE_SYS_HAS_GET_COMM_STATE
Performing Test DUNE_SYS_HAS_GET_COMM_STATE - Success
Performing Test DUNE_SYS_HAS_SET_COMM_MASK
Performing Test DUNE_SYS_HAS_SET_COMM_MASK - Success
Performing Test DUNE_SYS_HAS_PURGE_COMM
Performing Test DUNE_SYS_HAS_PURGE_COMM - Success
Performing Test DUNE_SYS_HAS_WAIT_COMM_EVENT
Performing Test DUNE_SYS_HAS_WAIT_COMM_EVENT - Success
Performing Test DUNE_SYS_HAS_SET_COMM_BREAK
Performing Test DUNE_SYS_HAS_SET_COMM_BREAK - Success
Performing Test DUNE_SYS_HAS_CLEAR_COMM_BREAK
Performing Test DUNE_SYS_HAS_CLEAR_COMM_BREAK - Success
Performing Test DUNE_SYS_HAS_CLEAR_COMM_ERROR
Performing Test DUNE_SYS_HAS_CLEAR_COMM_ERROR - Success
Performing Test DUNE_SYS_HAS_WAIT_FOR_SINGLE_OBJECT
Performing Test DUNE_SYS_HAS_WAIT_FOR_SINGLE_OBJECT - Success
Performing Test DUNE_SYS_HAS_CREATE_EVENT
Performing Test DUNE_SYS_HAS_CREATE_EVENT - Success
Performing Test DUNE_SYS_HAS_RANDOM
Performing Test DUNE_SYS_HAS_RANDOM - Failed
Performing Test DUNE_SYS_HAS_SRANDOM
Performing Test DUNE_SYS_HAS_SRANDOM - Failed
Performing Test DUNE_SYS_HAS_LRAND48
Performing Test DUNE_SYS_HAS_LRAND48 - Failed
Performing Test DUNE_SYS_HAS_SRAND48
Performing Test DUNE_SYS_HAS_SRAND48 - Failed
Performing Test DUNE_SYS_HAS_SCHED_YIELD
Performing Test DUNE_SYS_HAS_SCHED_YIELD - Failed
Performing Test DUNE_SYS_HAS_SCHED_GET_PRIORITY_MIN
Performing Test DUNE_SYS_HAS_SCHED_GET_PRIORITY_MIN - Failed
Performing Test DUNE_SYS_HAS_SCHED_GET_PRIORITY_MAX
Performing Test DUNE_SYS_HAS_SCHED_GET_PRIORITY_MAX - Failed
Performing Test DUNE_SYS_HAS___SYNC_ADD_AND_FETCH
Performing Test DUNE_SYS_HAS___SYNC_ADD_AND_FETCH - Failed
Performing Test DUNE_SYS_HAS___SYNC_SUB_AND_FETCH
Performing Test DUNE_SYS_HAS___SYNC_SUB_AND_FETCH - Failed
Performing Test DUNE_SYS_HAS_FORK
Performing Test DUNE_SYS_HAS_FORK - Failed
Performing Test DUNE_SYS_HAS_SHM_UNLINK
Performing Test DUNE_SYS_HAS_SHM_UNLINK - Failed
Performing Test DUNE_SYS_HAS_SHM_OPEN
Performing Test DUNE_SYS_HAS_SHM_OPEN - Failed
Performing Test DUNE_SYS_HAS_GETTEXT
Performing Test DUNE_SYS_HAS_GETTEXT - Failed
Performing Test DUNE_SYS_HAS_SYSLOG
Performing Test DUNE_SYS_HAS_SYSLOG - Failed
Performing Test DUNE_SYS_HAS_ISNAN_POSIX
Performing Test DUNE_SYS_HAS_ISNAN_POSIX - Success
Performing Test DUNE_SYS_HAS_ISNAN_CXX
Performing Test DUNE_SYS_HAS_ISNAN_CXX - Success
Performing Test DUNE_SYS_HAS__ISNAN
Performing Test DUNE_SYS_HAS__ISNAN - Success
Performing Test DUNE_SYS_HAS_POPEN
Performing Test DUNE_SYS_HAS_POPEN - Failed


*** Probing Types ***


Performing Test DUNE_SYS_HAS_STRUCT_TIMEVAL
Performing Test DUNE_SYS_HAS_STRUCT_TIMEVAL - Success
Performing Test DUNE_SYS_HAS_STRUCT_TERMIOS
Performing Test DUNE_SYS_HAS_STRUCT_TERMIOS - Failed
Performing Test DUNE_SYS_HAS_STRUCT_STAT
Performing Test DUNE_SYS_HAS_STRUCT_STAT - Success
Performing Test DUNE_SYS_HAS_STRUCT_FLOCK
Performing Test DUNE_SYS_HAS_STRUCT_FLOCK - Failed
Performing Test DUNE_SYS_HAS_CRITICAL_SECTION
Performing Test DUNE_SYS_HAS_CRITICAL_SECTION - Success
Performing Test DUNE_SYS_HAS_STD_TR1_SHARED_PTR
Performing Test DUNE_SYS_HAS_STD_TR1_SHARED_PTR - Success
Performing Test DUNE_SYS_HAS_SSIZE_T
Performing Test DUNE_SYS_HAS_SSIZE_T - Failed


*** Probing Libraries ***


Looking for BVTSonar_Create in bvtsdk
Looking for BVTSonar_Create in bvtsdk - not found
Looking for C++ include bvt_sdk.h
Looking for C++ include bvt_sdk.h - not found
Looking for libusb_init in usb-1.0
Looking for libusb_init in usb-1.0 - not found
Looking for FT_Open in ftd2xx
Looking for FT_Open in ftd2xx - not found
Looking for C++ include ftd2xx.h
Looking for C++ include ftd2xx.h - not found
Looking for jpeg_set_defaults in jpeg
Looking for jpeg_set_defaults in jpeg - not found
Performing Test DUNE_SYS_HAS_JPEGLIB_H
Performing Test DUNE_SYS_HAS_JPEGLIB_H - Failed
Performing Test HAVE_LIB_JPEG_80
Performing Test HAVE_LIB_JPEG_80 - Failed
Looking for hid_close in hidapi-libusb
Looking for hid_close in hidapi-libusb - not found
Looking for usb_device_find_USB_MCC in mccusb
Looking for usb_device_find_USB_MCC in mccusb - not found
Looking for C++ include mccusb/pmd.h
Looking for C++ include mccusb/pmd.h - not found
Looking for CPhidgetBridge_setEnabled in phidget21
Looking for CPhidgetBridge_setEnabled in phidget21 - not found
Looking for C++ include phidget21.h
Looking for C++ include phidget21.h - not found
Looking for sbp_state_init in swiftnav-static
Looking for sbp_state_init in swiftnav-static - not found
Looking for C++ include libswiftnav/sbp.h
Looking for C++ include libswiftnav/sbp.h - not found


*** Probing Programs ***


Looking for Python interpreter
IMC code generation enabled
Looking for Doxygen
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Looking for Info-ZIP
Gettext string extraction disabled
Gettext catalog merging disabled
Gettext catalog compilation disabled


*** System Summary ***


Processor : x86 64 bit / Little Endian
System : Windows
Compiler : Microsoft
C/C++ Library : Microsoft
Canonical : x86-64bit-windows-microsoft-vs2015


*** Optional Features ***


Module PICCOLO: Disabled
Module SHARED: Disabled
Module DEBUG: Disabled
Module PROFILE: Disabled
Module TLSF: Disabled
Module QT5: Disabled
Module DC1394: Disabled
Module V4L2: Disabled
Module JS: Disabled
Module XENETH: Disabled
Module BLUEVIEW: Disabled
Module OPENCV: Disabled
Module NO_RTTI: Disabled
Module UEYE: Disabled
Building static library


*** Tasks ***


Actuators.AMC
Actuators.Broom
Actuators.FLIRPTU
Actuators.LED4R
Actuators.MCD4R
Actuators.MicroCamD
Actuators.SCRTv4
Actuators.SIMCT01
Actuators.SingleSIMCT01
Autonomy.OnEvent
Autonomy.TextActions
Control.ASV.HeadingAndSpeed
Control.ASV.RemoteOperation
Control.AUV.Allocator
Control.AUV.Attitude
Control.AUV.Diving
Control.AUV.LMI
Control.AUV.RemoteOperation
Control.AUV.Speed
Control.AntennaTracker
Control.Path.Height
Control.Path.ILOS
Control.Path.LOSnSMC
Control.Path.PurePursuit
Control.Path.VectorField
Control.ROV.Depth
Control.ROV.HorizontalPlane
Control.ROV.RemoteOperation
Control.UAV.Ardupilot
Control.UAV.LOS
Control.UAV.PX4
Control.UAV.RemoteOperation
Maneuver.CommsRelay
Maneuver.CompassCalibration
Maneuver.CoverArea
Maneuver.FollowReference.AUV
Maneuver.FollowReference.UAV
Maneuver.FollowSystem
Maneuver.FollowTrajectory
Maneuver.Multiplexer
Maneuver.RowsCoverage
Maneuver.Teleoperation
Maneuver.VehicleFormation.SMC
Monitors.Clock
Monitors.Collisions
Monitors.Emergency
Monitors.Entities
Monitors.FuelLevel
Monitors.Medium
Monitors.OperationalLimits
Monitors.Servos
Navigation.AUV.Navigation
Navigation.AUV.Ranger
Navigation.General.GPSNavigation
Navigation.General.LBL
Navigation.General.ROV
Plan.DB
Plan.Engine
Plan.Generator
Power.APD
Power.BATMANv2
Power.CPMB
Power.DOAMv1
Power.DOAMv2
Power.LUEMB
Power.MCBv2
Power.OPCON
Power.PCTLv2
Power.PSIMAR
Sensors.AIM104MultiIO
Sensors.AIS
Sensors.CyclopsC7
Sensors.DMS
Sensors.DataStore
Sensors.Edgetech2205
Sensors.EmulatedGPS
Sensors.GPS
Sensors.Genesys
Sensors.GillWindObserverII
Sensors.Imagenex837B
Sensors.Imagenex852
Sensors.Imagenex872
Sensors.Imagenex881A
Sensors.Keller
Sensors.LIMU
Sensors.MLBL
Sensors.MLBLTracker
Sensors.MTi
Sensors.MetrecX
Sensors.Microstrain3DMGX1
Sensors.Microstrain3DMGX3
Sensors.MiniSVS
Sensors.OEMX
Sensors.OS4000
Sensors.SADC
Sensors.SCH311X
Sensors.SW100
Sensors.SonTekArgonaut
Sensors.ThermalZone
Sensors.WifiRSSI
Sensors.XR620CTD
Sensors.XchangeSV
Simulators.AcousticModem
Simulators.CTD
Simulators.DVL
Simulators.DepthSensor
Simulators.Docking
Simulators.Environment
Simulators.GPS
Simulators.Gaussian
Simulators.IMU
Simulators.Iridium
Simulators.LBL
Simulators.Leaks
Simulators.Motor
Simulators.Servos
Simulators.Target
Simulators.UAV
Simulators.UAVAutopilot
Simulators.USBL
Simulators.UnderwaterAcoustics
Simulators.VSIM
Supervisors.AUV.Assist
Supervisors.AUV.LostComms
Supervisors.Delegator
Supervisors.Entities
Supervisors.Power
Supervisors.Reporter
Supervisors.SlaveCPU
Supervisors.UAV.LostComms
Supervisors.Vehicle
Transports.Announce
Transports.Cache
Transports.CommManager
Transports.DataStore
Transports.Discovery
Transports.Evologics
Transports.FTP
Transports.Fragments
Transports.GSM
Transports.HTTP
Transports.Iridium
Transports.IridiumSBD
Transports.LogBook
Transports.Logging
Transports.LoggingDigest
Transports.LoggingURR4OS
Transports.Radio
Transports.Replay
Transports.Seatrac
Transports.Serial
Transports.SerialOverTCP
Transports.TCP.Client
Transports.TCP.Server
Transports.UAN
Transports.UDP
UserInterfaces.Buttons
UserInterfaces.LCD
UserInterfaces.LEDs
UserInterfaces.MantaPanel
Vision.DFK51BG02H
Vision.FrameGrabber
Vision.Lumenera
Vision.PhotoTrigger
Vision.UAVCamera

Disabled due to missing dependencies
Actuators.PWM
Autonomy.TREX
Maneuver.FlyByCamera
Maneuver.FollowTarget
Maneuver.VehicleFormation.Coordinator
Maneuver.VehicleFormation.FormCollAvoid
Maneuver.VehicleFormation.Test
Sensors.IFOG
Transports.MobileInternet
Vision.UI2210MGL

Configuring done


It would be great to get the dune executable files for windows - if possible.

Thank You. Appreciate any help.

Add flags to reduce build size and compilation time

One thing I find great about DUNE is that all the code is in one repo, so it is easy to understand what is going on (at least the information is easily available ๐Ÿ˜„ ). However, some of the code is taylor made for a particular vehicle or vehicle type, and will not be useable for others. But this code is still always compiled, leading to increased compile time and size of the binaries and build directory. Example: the ardupilot and px4 interfaces are also compiled when working with AUVs, even though they only support UAVs.

How about adding some cmake flags, like isUAV/isAUV, to make it possible to select what to compile? Or perhaps flags like notAUV are better, such that the default behaviour will not change, but it will be possible to add a flag to specify what should not be compiled.

I'll be happy to put in some of the work for this, but I don't bother if it is a bad idea or if its just gonna hang here as a PR for all eternity ๐Ÿ˜…

Weird call to onUpdateParameters

Hey,
We are in the process of testing the new GUIDED option that came with AP3.7 (sending roll/pitch/throttle commands directly), which has forced me to stare at the consume CLoops function in Control/UAV/Arduplane. So now I have a question:

Before activating FBW, onUpdateParameters is called, seemingly to update rc_min values since they are needed in the value=>pwm mapping in consume DesiredRoll. However; the only time rcN.val_max is updated is through a parameter update, which calls onUpdateParameters by default, making the onUpdateParameters-call in consume CLoops [1] redundant?

[1]

onUpdateParameters();

Regards,
Kristoffer Gryte

Dune runs on beaglebone black.

Hi, I want to run Dune on the beaglebone black. And my beaglebone black have the Debian 10.3 system.
if Debian support the operation of Dune?

Another question, I have build the Dune on my beaglebone black. And without any external hardware equipment, run a vehicle simulation. After that, the screen displays the following error:

dune

Does this mean that dune can be used normally in the future?
Thanks.

PathController step/loiter doesn't run when DesiredPath is updated

Looking into PathController again: I realized that if you receive DesiredPath at the same frequency as m_cperiod, step/loiter will not be called at all.

In consume(desiredPath), m_ts.now = now

m_ts.start_time = now;
m_ts.end_time = -1;
m_ts.now = m_ts.start_time;

while consume(EstimatedState) returns before calling step/loiter if the time between "last run" and now is less than m_cperiod:
if (now < m_ts.now + m_cperiod)
return;

which causes step/loiter to not be run at all.

I discovered this while working with FollowReference, where I update the Reference at the same frequency as the PathController. This might be a "user problem", since I have little experience with FollowReference (so please correct me if I do something wrong :) ). From a control perspective, of course the inner loop should be faster than the outer loop, but I still think the inner loop should run :) Haven't tried, but I guess this also means that every time you receive a new path, step/loiter will be skipped. Is there a rationale behind this?

Thanks!

Math/Matrix: Possible error in quaternion <-> Euler angles conversions

What is the Euler angle convention used in Matrix::toQuaternion and Matrix::toEulerAngles. The math in toQuaternion seems to match that for the ZYX convention, but I can't get it to work out the other way. I would suggest declaring the Euler angles convention used in the docstrings in the header, for clarity, and updating the methods accordingly.

For instance noticed that

double data[] = {1, 2, 3, 4};
Matrix q1(data, 4, 1);
q1 /= q1.norm_2();  // Normalize
Matrix q2 = q1.toEulerAngles().toQuaternion();

gives different q1 and q2 for pretty much all values of q1.

Throwing RestartNeeded from onUpdateParameters() is broken at task creation time

Manager::createTask() calls Task::loadConfig(), which then calls updateParameters(). If the task's onUpdateParameters() throws a RestartNeeded, it will go all the way up to Manager::createTask().

Manager::createTask() has two exception catchers, one for std::runtime_error and a "catch-all" which just prints a simple "unknown exception" error message. RestartNeeded is NOT derived from std::runtime_error.

It is normal practice to throw a RestartNeeded whenever onUpdateParameters() fails. If it fails at task creation, the task doesn't get restarted and there's no informative error message as to why this happened. This may happen if the user forgets to set one of the mandatory task parameters, for instance, or sets a parameter to an illegal value.

A quick fix would be just make RestartNeeded derive from std::runtime_error, which at least prints a useful error message. Unfortunately, this also means that the task is not restarted, and after correctly setting the parameters the user has to restart DUNE.

A better fix would be to explicitly catch RestartNeeded exceptions when calling Task::loadConfig(), and attempt to restart the task at a later time. This may however involve some complex changes to the task creation logic.

Sporadic segmentation fault at startup

We have discovered a bug causing sporadic segfaults at startup. It happens somewhat rare, but is very easy to reproduce.

Version to run

master (as of now 2a32fbe)

Effect

Seg-fault.

How to reproduce

  1. Compile a debug-build of dune (cmake -DDEBUG=True .)
  2. Build
  3. Load gdb (gdb dune)
  4. In the gdb prompt, do
    1. set pagination off (to let it auto continue)
    2. break Logging/Task.cpp:369 (Set a breakpoint a bit after startup)
    3. commands (will give you a new prompt)
      1. run
      2. end
  5. run -c lauv-seacon-1 -p Simulation

This will seg-fault quite fast. Depending on the machine, it will attempt the startup a couple of times a second.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.