Giter Club home page Giter Club logo

openrov-software's People

Contributors

bransorem avatar brianadams avatar briangrau avatar codewithpassion avatar davidtlang avatar depperson avatar dominik-fretz avatar estackpole avatar fusion94 avatar jtrezzo avatar mikemccand avatar ohcolinho avatar simonech avatar smurthas 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  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

openrov-software's Issues

Save to current camera image as a snapshot

On the UI enable a 'capture' function with an button and a keyboard shortcut.

  • in the sidebar you can see thumbnails of the captured images
  • you can download the images to topside

When the Node.js process dies (SIGINT or the likes), the connection shows as active

Current Behavior: When running the most recent BeagleBone, when I SSH and kill the Node.js process, the web interface does not appear to update and instead shows the green connection light.

Expected Behavior: When the backend process fails (or is killed) the connection light should turn red, and control of the ROV should be suspended with an error message.

Notes: This was tested with just the bare BeagleBone, no shield/Arduino/etc. It was tested with the linked disk image.

Kill the motors in the case the cockpit looses connection

Eric pointed out that with the 5 minute connectivity issue, you can have the connection drop with the motors still powered with no way to turn them off.

The beagle code should call the Arduino stop command when connectivity is lost.

Unable to update Arduino code on Cape from Cockpit

When trying to update Arduino code on the Cape from the cockpit interface, the code fails to upload. It repeatedly returns these error messages
"Initiating arduino reset
upload failed, trying again.
avrdude: stk500_recv(): programmer is not responding avrdude done. Thank you."

It seems that many people are having the same issue

See this thread for more information: http://openrov.com/forum/topics/trouble-loading-code-into-cape-bd?id=6365107%3ATopic%3A34028&page=2#comments

Improve Arduino firmware upload dialog to report errors

When uploading Arduino firmware there might be errors:

  • Error while unpacking files
  • Error while compiling
  • Error while uploading

These errors should be reported in the UI accordingly.

To enable this, the scripts in /linux/arduino/ would to be extended. Currently they report error code 0 (no error) always.

Need plugin/module system for the node.js cockpit software

The system is already event based, which means messages are shooting around on a bus that can easily be extended. Need a way to organize and register modules of functionality that plug in to the eventing system. Ideally a maker can create a new visualization for a sensor that others using the same sensor could select for use in their cockpit configuration. If a robotic arm is added, the UI for interacting with that arm can be a similar pluggable cockpit module.

As a user I want to be able to calibrate my ESCs so that they work optimally with the pulse range of the arduino

There are some standard procedure for calibrating ESCs. Usually it's:

  • start the ESC with full-throttle applied
  • keep full-throttle for a few seconds (till leds change color)
  • move to full throttle reverse
  • keep for a few seconds
  • move to midpoint
  • keep a few seconds
  • enjoy

Also some ESCs come with settings that are not ok for the ROV (mine where set as default to start reverse only a few seconds of zero throttle). Not sure how we should handle this

The arducopter code does automatic calibration: we might as well take inspiration on how they did it.

The Arduino code needs a plugin/module system

The goal is to give makers a way to add useful code for the senors, motors, etc that other people can leverage without stepping on each others toes. One thought was to have a build system where using a web site you can select the different sensors and features you want in your firmware version and the site kicks down the .hex file for loading. There is certain meta-data needed to keep code from conflicting with one another.

Add a raw display of streaming sensor data to the cockpit

Per dev call comments from Jim. A way to see the raw data so that someone working the Arduino could add data and have it pass all the way through to cockpit for viewing without having to know anything about the cockpit software.

as user I want to be able to control my ROV via the joypad

We already have joypad support, but current code is not update with the lastest APi changes.
Also LED brightness and servo tilt is not implemented yet.

Probably led brightness can be changed with 2 of the action buttons of the joypad while servo tilt probably the triggers in the back of pad.

Drive motor servos with the writeMicroseconds() function rather than write()

In the arduino software, the motor servos are driven with a call to the servo library write() function. This function takes an integer input from 0 to 180, with 90 being stop and 180 being full forwards. With the current motor arrangement, full power is at about 120, so we are only using 30 counts to represent the full range of forward speeds.

The software should be changed to use the writeMicroseconds() function, which uses a range between 1000 and 2000, with 1500 as stop. Resolution of motor control would increase by a factor of 5, and in addition the linearity of control would improve, because internal to the Arduino servos library, the write() function is mapped directly onto the writeMicroseconds() function, and the mapping of a range of 180 to a range of 1000 is not an integer multiple.

Besides changing the servo call, the midpoint value will need to change, and there are likely upstream changes in whatever code reads the joysticks as well. I'm not familiar with this code so I can't comment on the changes required.

Arduino code should report its version number to cockpit

As OpenROV matures and we have more people tinkering with it, I'm trying to think about ways to keep software debugging and software maintenance from becoming a nightmare. One of the things I have noticed is that there doesn't appear to be anything in the Arduino software for the end user to know what version is running on his Cape. He could always download a new version, but this is of limited help in the debugging process, and is of no help at all if work is being done on an experimental version of the Arduino code. This has the potential to be a configuration control nightmare.

So, what I propose is that the Arduino code start it's serial message to the BB JS code with a header that has version and checksum information in it.

Here's a description of what I propose. It will likely have to be implemented in stages. This is just a concept, I'm open to any other idea that has the same version-reporting functionality

In the arduino code, there are two 32-bit constants defined. One is the version number, the second is a checksum.

The serial message that goes from the Arduino to the BB starts with a header. As a minimum, that header includes the version number and the checksum.

The version number would consist of 4 1-byte fields. The first is the target hardware type- such as Arudino Uno, Mega, Due, custom, or whatever. The second shows the author of the build. 0 could represent official builds, other numbers could be assigned to trusted end users who have running forks of the Arduino code. A block of numbers would be open for home users to do whatever they want with. The third and fourth bytes represent the build number, which is incremented every time there's an official change in the Arduino code by the maintainer.

At first, updating of the build number could be done manually by the maintainer. At some point, whatever build script is used can auto-generate a build number during the process of tagging the build as an official one. It is at that point in time that the checksum is calculated as well. The checksum would have to somehow be based upon all the code -except- for the version number and checksum constants.

The JS code in the BB would pass the version number up to the cockpit. If there's any question as to what's running on the cape, the user can just look at the appropriate part of the display and see. So if you're a newbie having problems at home, part of your problem desription is to report what version of Arduino code is running on your cape. If you're tinkering at home with various Arduino versions, you don't have to guess what you last loaded on the ROV.

The documentation for the home builder will need to be revised to mention this functionality, and show the home user how he can assign his own custom build numbers to his experimental versions of the cape code.

The functionality of the checksum is a little trickier, and I'm not sure it's even possible. Ideally, the BB JS code should have a way of checking the SW that's loaded in the cape, and calculating a checksum of the result. This could then be checked against the checksum in the Arduino serial stream, and it could report if a checksum mismatch occurs. This functionality doesn't have to be periodic, it could be arranged to happen upon command from the user. The intent of the checksum is to be able to catch situations where the code was modified but the version and checksum constants were not changed.

Thoughts?

-Walt

Add a dive log

As the user of the OpenROV pilot, I wan't to be asked if I want to save the last dive in the DiveLog once the ROV is on the surface for 5 minutes. Alternatively, I can press a button to save the dive in the DiveLog.
While saving the dive, I can add additional information:

  • Location (If my laptop has a GPS module, this could be used)
  • Dive Site name
  • Comments

The following things have to be recorded in the DiveLog:

  • DiveTime
  • Max Depth
  • The dive profile with depth and temperature graphs
  • Screenshots taken during the dive.
  • Location, Dive site name, comments
  • Battery levels in an interval of 1 min

The dive log should be vieweable any time on the UI and exportable to a HTML document with.
This enables me to keep track on my dives easily.

Discuss about a better separation of responsibilities among different components (and then refactor)

We have 3 components:

  • html cockpit
  • node.js app
  • arduino code

all of them now do some kind of mapping and transformations to and from physical values and commands from the operator.
I think it would be better to place all those conversion in the arduino code, and have UI send logical commands to the node.js app which should send them to the arduinio without conversions. And let the arduino do conversion from yaw, throttle lift values to motor speed, and convert voltage ranges to battery level and in future temperatures, depth and heading. This way the arduino is the one that needs to be changed if the electronics part changes.

app.js socket disconnect event not firing

Connect with browser. Kill the browser. Expect the socket.onDisconnect code below to leave a notice in the log file. Does not.

io.sockets.on('disconnect', function(socket){
connections -= 1;
console.error('disconnect detected');
if(connections === 0) controller.close();
});

AUX2 function: PWM or On/Off function

It would be nice to have some basic functionality for the AUX2 output on the Cape.

First toughts would be to have it either a pwm control as AUX1 for external lights, or configurable to On/off for driving relays, solenoid, valves etc.

A pilot can choose battery profiles from the settings screen

The battery profiles would change the behavior of the ROV to optimize it for the given characteristics of the battery. Things like overall throttle cap, meter rate of motor power changes, etc... change based on maximizing battery life and preventing failures in low power situations. The throttle behaviors change as they take in to account the current Voltage as an indicator of battery life based on the battery type.

When the spawn of a new video capture process fails, the cockpit dies.

When the capture process fails to start, an exception is thrown by the child_process lib and not being catched it kills the whole process.
Probably it should be catched, and have the possibility to retry launching the capture process

ENOMEM looks like a NO MEMory exception or something similar

child_process.js:794
    throw errnoException(errno, 'spawn');
          ^
Error: spawn ENOMEM
    at errnoException (child_process.js:847:11)
    at ChildProcess.spawn (child_process.js:794:11)
    at exports.spawn (child_process.js:618:9)
    at camera.capture (/opt/openrov/src/lib/OpenROVCamera.js:65:25)
    at Object.fs.exists [as oncomplete] (fs.js:91:19)

Before working on new features, a bit of refactoring is need to make things a bit cleaner

  • decide and apply the roles of each device: now is a bit mixed as the Arduino Controller converts yaw and throttle to motor mixing, while probably this is better to send yaw and throttle and elevation to the arduino directly, and have it deal with motor mixing)
  • Use better SoC in the arduino module (now sensor classes handle also serial communication)
  • clean a bit the javascript frontend: right now is a bit of spaghetti code :)

I think it's better to do them after the release

The ROV should skip the deadzone when controlling the motors

The deadzone is a concept that comes from the fluctuations in analog controls as well as the at rest pressure fluctuations from a human hand on the controls. In the digital world, we don't have to worry about the analog jitter. The deadzone for handling human at rest pressure is controller dependent. The ROV control code itself should know where the start and end of the dead zone along the 1000 to 2000 control range of the ESCs happens to be and treat the entire deadzone as a single increment.
A keyboard users who adds one unit of trim should see the motors at there lowest rotation start moving. They should not have to keep upping the trim from 1..2..3..end of dead zone... for the motors to start moving.

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.