MrlComm library - customMsg publishCustomMsg what do we need ?

Hi,

This is a question to the community about what is needed regarding custom messaging to and from MrlComm.   Any references of this being used, or requirements, or suggestions would be appreciated.

Part of this is describing what kind of interface or methods are needed (if any more) and also the msg size - potentially if we have a byte msg structure we (almost) can have msg size == 255 vs 64

Thanks.

Greg.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
moz4r's picture

Hi !  First thanks to

Hi !  First thanks to calamity and all the team about all day great work .

This part is a great tool to use a standalone library and VERY easy read and write data . To comunicate with this "custom" code. For someone need to work on a 100% arduino code.

The idea is to add a custom code inside the main loop of mrlcomm ( without mod the rest of the code if possible )

This is the sample code from calamity ( ping test ) :

arduino inside : https://github.com/MyRobotLab/pyrobotlab/blob/develop/home/Calamity/cust...

python side :

https://github.com/MyRobotLab/pyrobotlab/blob/develop/home/Calamity/cust...

 

My friend Dom use a part of it , concerning a great standalone project and he use an other method to write the data than custommessage function ( He will be happy to share his experience to help the community and describe the method )

code : https://github.com/MyRobotLab/aiml/tree/master/bots/BOTS-FRENCH/Inmoov_A...

French post : http://inmoov.fr/forums/topic/activator/

@Dom can you tell us :

- What are your communications problems and how they can be enhanced

- What fonctionalities do you need to help you more

- And for others they want to use calamity function or Dom work to control they inmoov ( or work on it ) why to rewrite the mrlcomm instead of use the custom Message ?

 

 

Sorry about my language, aaarrg my robot speak better than me

 

dom14's picture

Activator

Hi,

My name is Dom and i developp Activator project for InMoov robot.

For this project, i use an arduino nano. I use several fonction of MrlComm for simule MrlComm protocol with myrobotlab. If you see my software, i don't use example of Calamity. I modify MrlComm.cpp and MrlComm.h to make adaptor for my projet.

I think for improve communication:

First: used the serial interrupt in MrlComm. 

Second: In Java myrobotlab used send-received function with try 3 times before give an error.

Sorry for my english and thank you for your developpment.

Dom. 

 

GroG's picture

Hello Dom ! Do you have the

Hello Dom !

Do you have the modified code checked into GitHub?
Is there a way I could see what you have done ?
Did you try Calamity's way with custom message ?  Did it not work correctly for you ? 
 

calamity's picture

The idea of CustomMsg and

The idea of CustomMsg and PublishCustomMsg is to use the powefull communication already set between MRLComm and MRL to carry user defined functions messages or data between MRLComm and MRL. I have intentionnally left the content of the CustomMsg unstructured to allow user to define the messages the way that suit their need.

The idea came after I have seen users use serial.write to send signal to an arduino without MRLComm to control it. But this made one way communication only. Since MRLComm have been reworked to be use like a library, it was easy to just make the communication work and be available to a script that can use MRLComm library.

@Dominique: I have take a look at your "custom MRLComm". What you did is to highjack some of the MRLComm function. So you will clearly run into problem. Everytimes MRLComm will change your code will break and will be a nightmare to maintain. And as soon as you won't have time to maintain it, you nicely writen code will probably die. Instead of highjacking MRLComm, you should work with it.

Another thing is that you put all your code and variable into MrlComm.cpp. It working for you because you are the only one doing that, but when 10s of similar things are writen this way, is make a giant spagetti code that become really hard to maintain. Previously, MrlComm what written that way, and we work hard to clean thing and use the C++ classes so everything is at their place and don't interfer with each other. You should really consider working your code that way, it makes things way more easier to maintain and integrate.

I have read a bit about your Activator, and it's really a great idea. And I really think it could shine much more as a MRL service than in a stand alone project. I'm sure the MRL team will be more than happy to help you.

GroG's picture

Yes ... What is the "Activator" ?

Sounds cool :)