Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image instead of robot #174

Closed
Stef-90 opened this issue Sep 14, 2021 · 20 comments
Closed

Image instead of robot #174

Stef-90 opened this issue Sep 14, 2021 · 20 comments
Assignees
Labels
enhancement New feature or request

Comments

@Stef-90
Copy link

Stef-90 commented Sep 14, 2021

Since it generates predicted path, I assume, direction of the robot is known property.
It would be great visually to have picture of the actual robo instead of colored circle.

@PiotrMachowski PiotrMachowski self-assigned this Sep 14, 2021
@PiotrMachowski PiotrMachowski added the enhancement New feature or request label Sep 14, 2021
@PiotrMachowski
Copy link
Owner

Maybe I will add it someday ;)

@Xitro01
Copy link

Xitro01 commented Jan 31, 2022

Looking for this as well, I know that someone already managed to do this:
matt8707/hass-config#55

@rospogrigio
Copy link
Contributor

I developed this, have a look if you are interested: #246 . 😉

@axcs
Copy link

axcs commented Feb 24, 2022

I tried to clone the DEV branch, but I don't know why the map didn't appear, it gave errors in functions that had "vacuum_pos.a"

@rospogrigio
Copy link
Contributor

I tried to clone the DEV branch, but I don't know why the map didn't appear, it gave errors in functions that had "vacuum_pos.a"

Mmmm I see, maybe your robot does not provide the orientation. Try replacing a = None with a = 0in xiaomi/map_data_parser.py, line 169

@PiotrMachowski
Copy link
Owner

I am aware of this issue, it will be addressed 👍

@PiotrMachowski
Copy link
Owner

Or you (@rospogrigio) can do it if you want to

@rospogrigio
Copy link
Contributor

I'm a bit busy at the moment, so feel free to fix it the way you find the most suitable...

@axcs
Copy link

axcs commented Feb 24, 2022

I tried to clone the DEV branch, but I don't know why the map didn't appear, it gave errors in functions that had "vacuum_pos.a"

Mmmm I see, maybe your robot does not provide the orientation. Try replacing a = None with a = 0in xiaomi/map_data_parser.py, line 169

I try this, but it didn't work, I have a Viomi, I don't know if it affects.
The error:

image_handler.py", line 204, in draw_func
a1 = (vacuum_pos.a + 104) / 180 * math.pi
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Nothing is urgent, I was just testing and trying to help, my knowledge is still at the beginning

@rospogrigio
Copy link
Contributor

Then in viomi/map_data_parser.py, line 323, try replacing return Point(x, y) with return Point(x, y, 0) in viomi/map_data_parser.py, line 169

@PiotrMachowski
Copy link
Owner

PiotrMachowski commented Feb 24, 2022

@rospogrigio @axcs It should be fixed on dev now: 410aaaf

@axcs
Copy link

axcs commented Feb 24, 2022

@rospogrigio @axcs It should be fixed on dev now: 410aaaf

Only with this new fix in DEV it didn't work again. In addition to your fix, it was necessary to change the line that rospogrigio said in viomi/map_data_parser.py
didn't you miss implementing the orientation for viomi vacuum cleaners?
I just passed the parameter to 0, but is there no way to get the orientation like xiaomi?

@PiotrMachowski
Copy link
Owner

@axcs does current version work? d0b1eb3

@axcs
Copy link

axcs commented Feb 24, 2022

@axcs does current version work? d0b1eb3

Yeh it works, thanks @PiotrMachowski .
There is no way to implement rotation for viomi. I have the viomi STYJ02YM In the Mi Home application, the rotation works, the image of the vacuum cleaner rotates to the position it is on.
And from the little I understand from the code, is there a way to rotate this for xiaomi devices, can't you replicate it for viomi?

@PiotrMachowski
Copy link
Owner

It might be possible, I need to take a look at raw map data

@axcs
Copy link

axcs commented Feb 26, 2022

Ok thanks,, I will try to understand the code to try to help in some way.
However if you can help with tests just answer that I help.
I believe it is not difficult to do something the same way as it was done for the xaiomi files

@PiotrMachowski
Copy link
Owner

@axcs it's really easy if data is there. Unfortunately right now I don't have much free time

@PiotrMachowski
Copy link
Owner

@axcs I have added this feature to viomi 👍

@PiotrMachowski
Copy link
Owner

Added in v2.2.0

@Xitro01
Copy link

Xitro01 commented May 25, 2022

Added in v2.2.0

It works just by updating and it's bloody awesome! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants