Giter Club home page Giter Club logo

open_mower_ros's People

Contributors

apehaenger avatar bodop avatar cedbossneo avatar clemenselflein avatar cloudn1ne avatar darthbubi avatar docgalaxyblock avatar erfre avatar jkaflik avatar kekzy avatar lucasw avatar midevil avatar mnh-jansson avatar ndaub avatar olliewalsh avatar tommarek avatar vermut 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

open_mower_ros's Issues

Leaving Emergency while mowing set the state to Docking

  • In mowing state
  • Lift or tilt the mower
    => the mower goes to emergency mode
  • Before the mower goes to Idle after 1-2 minutes, press unlock for 2 seconds
    => the mower goes to docking state
    Since the user decided to leave the emergency mode, the mower should just continue to conitnue as it was (mowing state). If the user wants the mower to go back to the docking station then he should request expliticly to move to the docking state (by pressing the home button for instance).

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies

I am facing this error when fetching the dependencies:

rosdep install --from-paths src --ignore-src --default-yes
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
mower_msgs: Cannot locate rosdep definition for [xesc_msgs]
open_mower: Cannot locate rosdep definition for [ftc_local_planner]
mower_map: Cannot locate rosdep definition for [xbot_msgs]
mower_simulation: Cannot locate rosdep definition for [xbot_positioning]
mower_logic: Cannot locate rosdep definition for [xbot_positioning]
mower_utils: Cannot locate rosdep definition for [xbot_msgs]
mower_comms: Cannot locate rosdep definition for [xesc_msgs]

Any idea what might be wrong?

triggering dynamic obstacles in simulator

Hello,
I managed to compile the code on an Ubuntu 18.04 system (i7). The simulator works.

Question: Is dynamic obstacle avoidance already implemented? How could we trigger dynamic obstacle in the simulator?
If it is not yet implemented, how about switching to 'teb_local_planner' for the obstacle avoidance? Once detected an obstacle (bumper trigger etc.), one could add a circle in the cost map in front of the robot and then use the 'teb_local_planner' to navigate around it...

Problem with compilation

[ 76%] Built target xbot_positioning_generate_messages [ 76%] Building CXX object lib/xbot_positioning/CMakeFiles/xbot_positioning.dir/src/xbot_positioning_core.cpp.o [ 76%] Building CXX object lib/xbot_positioning/CMakeFiles/xbot_positioning.dir/src/xbot_positioning.cpp.o /home/zlo/lawn_mower/src/lib/xbot_positioning/src/xbot_positioning.cpp:12:10: fatal error: xbot_msgs/AbsolutePose.h: No such file or directory #include "xbot_msgs/AbsolutePose.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. lib/xbot_positioning/CMakeFiles/xbot_positioning.dir/build.make:89: recipe for target 'lib/xbot_positioning/CMakeFiles/xbot_positioning.dir/src/xbot_positioning.cpp.o' failed make[2]: *** [lib/xbot_positioning/CMakeFiles/xbot_positioning.dir/src/xbot_positioning.cpp.o] Error 1 CMakeFiles/Makefile2:15499: recipe for target 'lib/xbot_positioning/CMakeFiles/xbot_positioning.dir/all' failed make[1]: *** [lib/xbot_positioning/CMakeFiles/xbot_positioning.dir/all] Error 2 Makefile:165: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed
Why this file missing?
I use ros melodic

Home Assistant MQTT

The Idea of this issue is to save stuff related to integrating the mower into Home Assistant.

HA 2023.09 added a MQTT Lawn Mower
https://www.home-assistant.io/integrations/lawn_mower
https://www.home-assistant.io/integrations/lawn_mower.mqtt

HA can discover mqtt devices by receiving topics.
https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery
https://mpolinowski.github.io/docs/IoT-and-Machine-Learning/Home_Automation/2022-07-10-home-assistant-mqtt-autodiscovery-part-i/2022-07-10/

A project that already uses this I know of is Valetudo
but it uses an older ha discovery standard (pre 2023.08)
and this docs (also old standard) may be usufull too: https://mpolinowski.github.io/docs/category/home-automation

I will update this initial post in the future

don't enter area recorder if battery is empty

currently the idle state will go to area_recording even if battery is empty. then the recording is instantly canceled because the battery is empty. idle will enter recording mode again if there is no map -> infinite loop which can't record and is not good for the battery.

Setting OM_MOWER_GAMEPAD=steam_* keeps failing openmower.service

Setting OM_MOWER_GAMEPAD="steam_stick" or touch in /boot/openmower/mower_config.txt keeps failing and restarting my openmower container. I'm running the latest version of OpenMowerOS on RPi 4 with OM_VERSION=beta.

openmower@openmower:~ $ sudo journalctl _COMM=podman + _COMM=systemd -f
-- Journal begins at Wed 2023-05-03 04:11:24 BST. --
May 30 13:24:10 openmower systemd[1]: Started Podman container - openmower.service.
May 30 13:24:13 openmower systemd[1]: libpod-45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0.scope: Succeeded.
May 30 13:24:13 openmower systemd[1]: libpod-45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0.scope: Consumed 5.194s CPU time.
May 30 13:24:13 openmower podman[7021]: 2024-05-30 13:24:13.303049637 +0100 BST m=+0.153707773 container died 45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0 (image=ghcr.io/clemenselflein/open_mower_ros:releases-beta, name=openmower)
May 30 13:24:13 openmower systemd[3199]: tmp-crun.V2cIno.mount: Succeeded.
May 30 13:24:13 openmower systemd[1]: tmp-crun.V2cIno.mount: Succeeded.
May 30 13:24:13 openmower systemd[3199]: var-lib-containers-storage-overlay\x2dcontainers-45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0-userdata-shm.mount: Succeeded.
May 30 13:24:13 openmower systemd[1]: var-lib-containers-storage-overlay\x2dcontainers-45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0-userdata-shm.mount: Succeeded.
May 30 13:24:13 openmower systemd[3199]: var-lib-containers-storage-overlay-903f13efc9fc9bad8282b6b5e3b577e13ad85d97b259e8b14032af76db4201c1-merged.mount: Succeeded.
May 30 13:24:13 openmower systemd[1]: var-lib-containers-storage-overlay-903f13efc9fc9bad8282b6b5e3b577e13ad85d97b259e8b14032af76db4201c1-merged.mount: Succeeded.
May 30 13:24:13 openmower podman[7021]: 2024-05-30 13:24:13.739406568 +0100 BST m=+0.590064667 container cleanup 45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0 (image=ghcr.io/clemenselflein/open_mower_ros:releases-beta, name=openmower, org.opencontainers.image.title=open_mower_ros, org.opencontainers.image.version=releases-beta, io.containers.autoupdate=registry, org.opencontainers.image.description=, org.opencontainers.image.licenses=NOASSERTION, org.opencontainers.image.ref.name=ubuntu, org.opencontainers.image.url=https://github.com/ClemensElflein/open_mower_ros, org.opencontainers.image.revision=a72fb92037cca2f2b27bef120103c310f379bbc4, org.opencontainers.image.created=2023-04-17T22:05:22.022Z, PODMAN_SYSTEMD_UNIT=openmower.service, org.opencontainers.image.source=https://github.com/ClemensElflein/open_mower_ros)
May 30 13:24:13 openmower systemd[3199]: var-lib-containers-storage-overlay.mount: Succeeded.
May 30 13:24:13 openmower systemd[1]: var-lib-containers-storage-overlay.mount: Succeeded.
May 30 13:24:13 openmower systemd[1]: openmower.service: Main process exited, code=exited, status=1/FAILURE
May 30 13:24:14 openmower podman[7054]: 2024-05-30 13:24:14.041509516 +0100 BST m=+0.258477435 container remove 45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0 (image=ghcr.io/clemenselflein/open_mower_ros:releases-beta, name=openmower, io.containers.autoupdate=registry, org.opencontainers.image.description=, org.opencontainers.image.licenses=NOASSERTION, PODMAN_SYSTEMD_UNIT=openmower.service, org.opencontainers.image.revision=a72fb92037cca2f2b27bef120103c310f379bbc4, org.opencontainers.image.url=https://github.com/ClemensElflein/open_mower_ros, org.opencontainers.image.title=open_mower_ros, org.opencontainers.image.version=releases-beta, org.opencontainers.image.created=2023-04-17T22:05:22.022Z, org.opencontainers.image.ref.name=ubuntu, org.opencontainers.image.source=https://github.com/ClemensElflein/open_mower_ros)
May 30 13:24:14 openmower podman[7054]: 45da4fbfa8e3629804c3b660d37d727275cf805021aa25fcb3b88d301ecd25d0
May 30 13:24:14 openmower systemd[3199]: var-lib-containers-storage-overlay.mount: Succeeded.
May 30 13:24:14 openmower systemd[1]: var-lib-containers-storage-overlay.mount: Succeeded.
May 30 13:24:14 openmower systemd[1]: openmower.service: Failed with result 'exit-code'.
May 30 13:24:14 openmower systemd[1]: openmower.service: Consumed 1.000s CPU time.

I'd be happy to provide more info, I just don't know what's needed and where to find it. I tried installing steam-devices but I suspect that doesn't matter for the container anyways.

Grass too high should slow down the mower

When the grass is too high, the mower continues at the same speed, leaving the grass as is.
Implementation:
First we must allow the user to define the prefered speed and then, optionally, when the mower detects that the mower motor speed is too low then it will decrease the mower wheel speed during 1 minute or so. Everything should be configurable through env var.

Wheel Ticks calculation error cause GPS jumps on mowgli hardware.

Im looking to track the issue identified in this conversation: https://discord.com/channels/958476543846412329/1079054431758332027/1235330953065267281

Jump in wheel ticks identified by c.ez:
image

yes, that definitively had an error in the sign, also the large jumps are not GPS, you can verify that the GPS plot is not jumping, but the position is. it's wheel ticks jumping!

Identified that its when wheel tick direction change is triggered that a wheel tick jump occurs.
image

Recommendation from Nekraus :
Nekraus โ€” 05/02/2024 8:51 PM
in robot localization in function onWheelTicks :
if(abs(vx) > 0.6) { ROS_WARN_STREAM("got vx > 1.0 (" << vx << ") - dropping measurement"); vx = 0.0; is_vx_valid = false; return; }

Dock to station backwards

[Feature request] My mower has charging points in the back, so when OpenMower trying to dock it it is unable to connect to the charger because it wants to drive into it with its front end. Would be a nice option, if docking and undocking drive direction would be configurable, to have an ability to dock a mower with charging points at rear end.

IMG_3002

Remove compiled app?

Having the compiled app as part of the repository makes it harder to manage PRs which contain changes to the UI. And the app is definitely no part of the ROS packages.

So I'm wondering whether you'd agree to remove the web directory completely, and compile it while building the image (i.e. make the app build another stage of the Dockerfile).

It might make even more sense to compile the app after pushing updates to the app repository, but I couldn't think of a good way to make those artifacts available.

If you want to explicitly refer to a certain app version, it could be included as a submodule.

Mower fails to navigate an area if the loop has an intersection

IMG_1014

The above map area causes the mower to fail completing/navigating the loop.

It would be good to either have a check for such an intersection when saving the area record and giving an error. Or if possible to have the intersection trimmed to be a clean loop.

Mower hits obstacle if area between boundary and obstacle is only two perimeters thick

Hi,
I have some problems with obstacles and the last perimeter (most inner perimeter of the obstacle) when the obstacle is close to the outer boundary. To visualize my problem I made the sketch.

grafik

Red area is the obstacle. Black is the planned path. Orange is the carrot. Green the area boundary. Other colors explained later.

Because the perimeter 1-3 (here are only three shown) of my obstacle are part of the boundary outline of my area, the perimeter 4 has a problematic starting point. After the outer boundary is mowed, perimeter 1-3 of my obstacle are finished. It than drives to the obstacle to mow the perimeter 4 only.
The carrot drives to the starting point and than turns left, but there is the obstacle and it cannot turn.

It somehow needs to start the last perimeter with the correct driving direction, as it is always given, when driving 4 perimeters around and obstacle.
If I understood my problem correctly, one solution could be to use the first two datapoints, extrapolate them to the first perimeter and move to this point. Like shown in blue: there are two crossing points of extrapolation and perimeter. One works, the other not.

It maybe a bit more complicated:
Violet line is the extrapolation of a different starting pount. Violet areas possible points on the outer perimeter. Green is the outer boundary of the mowing area. Driving from the calculated point may be a large distance and may cross obstacles.

Comment: yes, it is MS paint. My working computer has no other program and my other computer is broken ;-)

Reverse mower-motor direction doesn't work

Behavior:
sometimes it feels the robot is not mowing anything.

Test:
I made several tests where I enable/disable mowing and I change the direction

  1. (normal) rosservice call mower_service/mow_enabled 1 1
  2. (reverse) rosservice call mower_service/mow_enabled 1 0
  3. (stand-by) rosservice call mower_service/mow_enabled 0 0

Normal state 1 works very well, the motor is consuming close to 1A and the motor speed is quite high.
Reverse state 2 doesn't work well at all.

  • After a stand-by, it turns but very slowly and it's not making much sound.
  • After a normal state, motor is stopped.

The problem is coming from : #43

Path crosses not allowed areas

Screenshot_20240203-104750
Screenshot_20240202-182417

In both cases the mower tries to drive through an area where he is not allowed to. In the beginning I thought it is a lack of gps signal, but then for s hort moment I saw, that there was an orange, in my understanding planned, path through this area.

It might be related to #63 . I installed the patch, but it did not help.

docker build fails

Building the current docker container fails with a cmake error:

Step 9/13 : RUN bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && catkin_make"
 ---> Running in 7dbb4e834124
CMake Error: The current CMakeCache.txt directory /opt/openmower/build/CMakeCache.txt is different than the directory /home/tocc/workspaces/ros/open_mower_ros/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/opt/openmower/src/CMakeLists.txt" does not match the source "/home/tocc/workspaces/ros/open_mower_ros/src/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
Base path: /opt/openmower
Source space: /opt/openmower/src
Build space: /opt/openmower/build
Devel space: /opt/openmower/devel
Install space: /opt/openmower/install
Removing symlink "/opt/openmower/src/CMakeLists.txt" which points to non-existing file
Creating symlink "/opt/openmower/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /opt/openmower/src -DCATKIN_DEVEL_PREFIX=/opt/openmower/devel -DCMAKE_INSTALL_PREFIX=/opt/openmower/install -G Unix Makefiles" in "/opt/openmower/build"
####
Invoking "cmake" failed
The command '/bin/sh -c bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && catkin_make"' returned a non-zero code: 1

Include information about submodules in ReadMe build steps.

What?

The ReadMe's Getting Started section jumps directly into using rosdep to install dependencies.

When following along, these errors occurred during the rosdep install --from-paths src --ignore-src --default-yes step.

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
open_mower: Cannot locate rosdep definition for [ftc_local_planner]
mower_comms: Cannot locate rosdep definition for [vesc_driver]
mower_msgs: Cannot locate rosdep definition for [vesc_msgs]
mower_logic: Cannot locate rosdep definition for [slic3r_coverage_planner]

Why?

The errors were caused by not having the sources for the listed packages.

How to fix?

To fix the issue, I had to update the submodules. They were not included with the default clone settings ([email protected]:ClemensElflein/open_mower_ros.git)

Fix

To update the submodules

git submodule update --init --recursive

This command will update and initialize (--init) the repository's sub modules, as well as any of the submodule's submodules (--recursive).

After successfully cloning the submodules, rosdep install --from-paths src --ignore-src --default-yes works as intended.

topic for publishing action

Hi Clemens, writing an integration into a home automation product for openmower. So far so good. Seem to have an issue getting the actions executed. I am publishing to the action topic, it looks like the allowed actions are in topic actions. But so far the mower does not react when i publish a message. What are the messages you are expecting on what topic? Thank you so much.

UART2 configuration

In the GPS config we should have UART2 configured correctly, currently the GPS chip sends GPS pos to the UART2, which makes no sense.

Obstacle too close to the area bound can lead to wrong path

I have an example where an obstacle is close to the area bound. It makes the polygon of the first outline to be split. It could be fine, but the assumption is that n outlines (by default n=4) beginning and end are close to each other so they can form a unique path. This assumption is wrong (I believe).

Here is the 4th outline which is cut into 3 pieces (a long one and the 2 highlighted):
image

And here you can see when the 2 are finished, it goes straight to the next outline (the second), the beginning of this one is too far way:
image

It passes outside of the authorized navigation area.

From my point of view, the issue is in function planPath of coverage_planner.cpp but I don't know exactly, having unit tests would help...

Mower pause/resume bug

When using pause/resume. If you hit pause before the mower has done it's 10 second count for gps it will cut off the blade motor but the mower will follow the mow path still.

To reproduce the issue, pause the mower, once stopped then resume and pause again before the mower fully resumes.

2.5s for tilt_emergency_millis might be too low

TILT_EMERGENCY_MILLIS value of 2.5s is too high. In some cases, the ground is not flat and the robot is moving very slowly there. We need to allow users to setup their own value.

Implementation:
The only place I found where the firmware receives information is through ll_heartbeat structure where emergency flag can be reset. So I'm thinking to add a new field called tilt_emergency_millis, set in in mower_comms by reading an env var. The firmware will read and set it when it receives the heart beat. While I'm at it, I will probably set lift_emergency_millis as well. What do you think ?

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.