Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Omron B5t Sensor

Anyone managed to hook one up to the EZB yet ?............just curious.


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates with ARC Early Access edition. You'll have everything that's needed to unleash your robot's potential!

#216  
@Mickey666Maus no worries. It was good feedback for me to see that having a default path in there can appear confusing. I had to release another update to fix some other issues related to how the variables are treated in ARC so I changed the default path to make it more clear that it must be changed.

Lets all make our bots smarter now with our Omrons. :)
#217  
Antonn says "I see Ron" or "I see Me !" LOL

I cleaned out all the old files and junk. I reloaded the plugin and set up the storage album. I made two scripts one to run the software in a 500 ms loop, the other for speech recognition and all is working well !

Next step is to play a bit, then begin to do more with having responses to the person seen.

I still want to try having faces collected from the tv, which will cause a response.
Spock will be the first. I will let you know how I make out.

Ron
#218  
Justin,

Do I have to reload everything again if I update to ver 5, or can I just delete the plugin and load it back into the old project? I will upload the faces in the camera back to the software.
#219  
@Ron, You can delete anything you want, but you don't need to. You should only need click the update plugin inside ARC when there is an update.

In the trouble shooting section of the plugin webpage I mention removing the plugin from your "project" then adding it back if the camera have an hiccup after an update.

I'm sure it is a pain to retrain faces all the time. Loading the faces from the camera back into the software should work or making a copy of the album data before a plugin update then restoring the album folder would work also.
#220  
@JustinRatliff Now I changed the default path and everything works as it should!
Thanks a lot for your work and for your patience....I hope I will soon have some time to do some fun stuff with my Omron!:)

@all if you guys are having code to share on how you are operating the Omron, I would be very curious about it...;)
#221  
Hi Mickey,

Load some faces and replace the names with the names you use in the camera.

Some simple code makes a lot of fun. Use the needed prompts and use a 500 ms loop to run the enable script.

Load up a speech recognition script. Question: Who do you see

He will say the name or If no one or just gender is seen he will respond.

Code:



if ($Omron_Recognized_Name = "Ron")

Say("I see Ron")


endif

if ($Omron_Recognized_Name = "Effie")

Say("I see Effie")


endif

if ($Omron_Recognized_Name = "Me")

Say("I see Me")


endif

if ($Omron_Recognized_Name = "")

Say("I see No One")


endif

if ($Omron_Recognized_Name = " " && $Omron_gender = "Man")

Say("I see a man")


endif

if ($Omron_Recognized_Name = " " && $Omron_gender = "woman")

Say("I see a woman")


endif



Ron
#222  
Hi Guys!


I also want to join again the thread! I was busy the last days!

But i see that the plugin also for you all work!

Great!

@mickey: Ok i was thinking like that (wollte nur mal was auf deutsch fragen/sagen ;-))

You want to have some script for the omron:

no problem, look here:

http://www.ez-robot.com/Community/EZCloud/RobotAppDetails.aspx?id=5220

To this sript i have also a question (maybe Justin can give me an answer)

I want to calculate the diffrences between to dates in hours!

This means:

14.12.2017 23:00 (Start - pm)
15.12.2015 04:00 (End - am)

this are 5 hours difference.

But the cool thing is - the difference is from two days!

I found some calculations to make the difference from dates - but the result are days, not hours!


Have somebody a nice idea?

Best Boris



PS: @ Justin - Nice comment @ thingiverse - thanx

And your plugs working great!
#223  
@AndyRoid Sweet, thanks for sharing, that is a good starting point to mess around!:)

@rentaprinta ( Boris, oder? ) That looks massive, I hope I will be having the time soon to check what you did there! Very cool!


I already noticed there are a couple of Germans, the forum...its really cool we are such an international robotic enthusiasts team!
Du kommst aus Berlin oder? Ich wohne in Bremen....
( You are living in Berlin right? I am located in Bremen... )

Lets keep on having some fun at the Omron Tea Party!:D
#224  
I'm glad the plugin is working well for everyone now. I appreciate everyone's feedback and testing! I was happy to play a part of the team on this. The Omron technical support working with me has been fantastic!

@Boris, looking at your cloud project I don't see anything in your project that relates to logging time/date or using time/date. As it does not relate directly do the Omron camera, I think you should start a new thread for your question on the date/time that way more members are likely to contribute solutions and we can keep this thread focused on the Omron camera.
#225  
Hello Justin,


no not in this project! This project is finish and check the age!

I checked where i saved this time project and i find out that it was not saved.

So i make it again and also a bit easier!

the Script starts with:


"omron Boris spy":

Code:



$last_reco_time = $date
$Omron_Recognized_Name = "0"

ControlCommand("Script Manager", ScriptStart, "spy_script")

:loop

ControlCommand("Omron HVC-P2", Omron_Detect_Options, "f,r,")


goto(loop)




"spy_script":

Code:


:startspy

if ($Omron_Recognized_Name = "Boris10")

goto(check)

endif

goto(startspy)


:check

#the difference of $last_reco_time and $date must be in minutes

if $last_reco_time - $date < 60

$last_reco_time = $date

goto(startspy)


elseif

$last_reco_time - $date > 60

say("you went away for 60 minutes")

$last_reco_time = $date

goto(startspy)


elseif

$last_reco_time - $date > 120

say("you went away for 120 minutes")

$last_reco_time = $date

goto(startspy)


elseif

$last_reco_time - $date > 600

say("you slept 10 hours")

$last_reco_time = $date

goto(startspy)

endif





So i hope this explains more what has this to do with the Omron CAM.


Boris


PS: @mickey

Jau icke komme aus Berlin! (i living in Berlin)

I was last time in Lübeck - maybe next week for one day to Hamburg..... tja Bremen ... long time ago
#226  
Hi Justin,
Next time you talk to the Omron rep. Can you ask him if there is a way to not have backgrounds effect the facial recognition? I am finding the recognition doesn't work away from the origional location of the recording. Do I need to fill the frame with only the face and eliminate as much of the background as possible?

Thanks,

Ron
#227  
Hi Andy,


yes you are right!

I also found out to have better different backgrounds to have better recognition.

But i must say i had a album with long hair and after some month i had shorter hair and the recognition works really good. Or i play with my Hand with my Hair and still the Recognition works good!


But I will ask about this. And meanwhile i will produce a album with only white backgrounds and i will check out if this is better then normal pictures.

Boris
#228  
Hi Andy again,

But if you look to the pictures in the saved album, you will see that the CAM will save the Face as big as possible. So the Background is everytime so small/less then possible.

But a test with a white background will be interesting.

Boris
#229  
@Boris,

First you are missing ( and ) around your IF and ELSEIF argument statements, I don't know if that happened in your copy and paste of code or not.

Next issue is your are not understanding or you are forgetting how $date is used in ARC because it is a "String". Strings are a type of variable that can contain words or anything but you can't perform math against a string variable. Look at your $date and $last_reco_time in your variable watcher and you'll see they are cast as STRING as the type.

This means when you attempt to tell ARC or the computer to perform "$last_reco_time - $date > 120" you could just as well try telling the computer to perform "Apple - Michael Jackson > 120" - clearly it makes no sense.

But there are other options avaliable. Look at ARC Script Help and you'll find these:
$date
$month
$year
$day
$dayName
$hour
$minute
$second
$monthName
$time

Try this code and see what gets returned in a Variable Watcher and look at the Type of Variable. This will help you see which of these options will be helpful and which will not (Hint, look for the variables types that are Number Type because you can perform math on those.).

Code:


$TestDate = $date
$TestMonth = $month
$TestYear = $year
$TestDay = $day
$TestDayName = $dayName
$TestHour = $hour
$TestMinute = $minute
$TestSecond = $second
$TestMonthName = $monthName
$TestTime = $time


Your final problem is your ElseIF logic usage. Take a look again at how you applied it because your robot would always say you were away for 60 minutes and it would never jump down to the other conditions.
#230  
Hi Boris,

Thanks for the info. Let me know how the white background works out.

Ron
#231  
Hi Andy,

i will do that!

Hi Justin,


I know that i can´t make "$date - $last_reco_date"

There is FmtDate and FmtTimeSpan but there i got a problem that my result is not in minutes.


So my question was: Which calculation gives me as a result the differences between two dates in minutes.


Thats not so easy to have only a "Einstein - Formula" and it works.

But thats why i am asking!

Boris
#232  
@Boris, it doesn't sound like you are taking the initiative to do the work, I gave you the variables that you CAN use and a script experiment so you can see what the options do and the types in ARC so you can understand how to use them properly.

You can't take the $date variable string with the time/date stamp in there, but you can use the individual variables:
$month
$year
$day
$hour
$minute

$second is even optional if you need it for something.

Your first script becomes:

Code:


$last_reco_time_month = $month
$last_reco_time_year = $year
$last_reco_time_day = $day
$last_reco_time_hour = $hour
$last_reco_time_minute = $minute

$Omron_Recognized_Name = "0"

ControlCommand("Script Manager", ScriptStart, "spy_script")
:loop
ControlCommand("Omron HVC-P2", Omron_Detect_Options, "f,r,")
goto(loop)
#233  
@Boris, for the second part of your script here is the part of the solution. I don't have time to build your entire script for you.

Code:


:startspy

if ($Omron_Recognized_Name = "Boris10")


goto(check)
endif
goto(startspy)

:check
#the difference of $last_reco_time and $date must be in minutes

if ($last_reco_time_year = $year AND $last_reco_time_month = $month AND $last_reco_time_day = $day AND $last_reco_time_hour = $hour AND $last_reco_time_minute - $minute < 60)

print("The time was less than 60.") #Print is just for testing

$last_reco_time_month = $month
$last_reco_time_year = $year
$last_reco_time_day = $day
$last_reco_time_hour = $hour
$last_reco_time_minute = $minute
EndIf
goto(startspy)


That will give you an idea of what you need to do to cover all of your time/date bases. I will recommend again you take this topic and start a new post so you get more input because likely no one else is going to follow the "Omron" thread if they don't have a camera and this is not related to the camera.

There are also other thread topics from other members who have solved the thread date/time script issues which you could search for in old community posts to see other solutions.
#234  
Hi Justin!

Thanx a lot for oyu help!


First i never (i also told this month before) want to have a complete ready solution!

I only want help! And you helped me again!

That why really big thanks to you! Cool Guy!

I found out with your script ideas what was wrong in my thinking!

I was working with the FmtTimeSpan in wrong way, but i found out in your script that i must separate each "part" - so days - hours - minutes

then i can bring everything to minutes (like breack statement from school)

days * 24 (hours) * 60 (Minutes)
hours * 60 (Minutes)
minutes (haha - no calculation ;-)

Then everything add and then we can compare the minutes with my "IF and ELSE" Statements


Here is the ready code for calculate the difference between to dates and the result is in minutes:

Update: First you must define a variable:

$date2 = $date

To calulate a difference, i change my computer time, then set the $date2, change again the computer time to the actual time and then the script can give you a result.



Code:



$tag = FmtTimeSpan(CDateTime($date) - CDateTime($date2), "dd")
$tagmin = $tag * 24 * 60
print($tag)
print($tagmin)
$stunde = FmtTimeSpan(CDateTime($date) - CDateTime($date2), "hh")
$stundemin = $stunde * 60
print($stunde)
print($stundemin)
$minutespan = FmtTimeSpan(CDateTime($date) - CDateTime($date2), "mm")
print($minutespan)
$kpl_zeit = ($tagmin + $stundemin + $minutespan)
print("The difference is : " + $kpl_zeit + " minutes")






For Translation i use german words:

tag=day
stunde=hour
zeit=time



And you see Justin, i don´t need a new Post, you fix this problem wih two answers! Come on, this is great!



Boris
#235  
I will write now the hole script for the omron cam and then i will post the hole script


Boris