Skip to content

Minimum update below to execute Pub/Sub demo on the mros2-mbed enviro…#7

Merged
takasehideki merged 1 commit into
mROS-base:mros2from
smoriemb:feature/minimum-update-for-foxy-support
Dec 10, 2021
Merged

Minimum update below to execute Pub/Sub demo on the mros2-mbed enviro…#7
takasehideki merged 1 commit into
mROS-base:mros2from
smoriemb:feature/minimum-update-for-foxy-support

Conversation

@smoriemb

Copy link
Copy Markdown

Related to the issue below, I prepared a minimum update for the embeddedRTPS to run the Pub/Sub demo with Foxy environment.
mROS-base/mros2#5

It seems that cacthing up the latest one also solve the problem. But, we can confirm your mROS 2 communicating with Foxy's node without a bit large update.

…nment.

- Increased the size of a message buffer, which is used for the SEDP procedure,
referring to the commit below.

embedded-software-laboratory@35869c8

- made the sub-message parser for the unicast locator more strict to avoid
invalid locatora, referring the commit above.
@takasehideki

takasehideki commented Nov 24, 2021

Copy link
Copy Markdown
Member

@smoriemb Thanks a lot! This PR will definitely help improve quality.
However, I can't confirm the communication with Foxy (sub from mros2 node) in my environment with mros2-asp3-f767zi. Do we need any special settings?

takasehideki added a commit to mROS-base/mros2 that referenced this pull request Nov 25, 2021
@takasehideki

Copy link
Copy Markdown
Member

I've confirmed this PR worked well on mros2-mbed.
It means the cause may be from TOPPERS kernel or its bindings 😢

@smoriemb

smoriemb commented Nov 25, 2021

Copy link
Copy Markdown
Author

Thanks for your confirmation.

It means the cause may be from TOPPERS kernel or its bindings

Maybe, your configuration for the amount of resource for lwip is not enough.
Actually, I managed to run the mros2 one mbed by increasing the buffer pool size of lwip as below at the first trial.

mbed_app.json
  ...(SNIPPED)...
  "lwip.pbuf-pool-size": 20    # <= the default is 5.
  ...(SNIPPED)...

And, I'm still not sure when/how we have to increase the value above.
Why don't you investigate the number of buffer pool size like above or the maximum number of the socket.

But, at least, the modification of this pull-request is required to run with Foxy no matter if the buffer size/socket number are enough or not.

@takasehideki

Copy link
Copy Markdown
Member

@smoriemb thanks for useful information!
In mros2-asp3-f767zi and STM32CubeMX, the configuration for lwIP is referred to lwipopt.h.
However, it has been set as you mentioned,,,
https://github.com/mROS-base/mros2-asp3-f767zi/blob/main/src/startup/include/lwipopts.h#L131-L134

@smoriemb

Copy link
Copy Markdown
Author

@takasehideki
Sorry for my later response.

Other configuration parameters might affect the result.
For example, I found the parameter below has a little less value, which I casually found in the lwipopt.h you indicated, compared to the Mbed's default (8).

TCPIP_MBOX_SIZE 6

Anyway, we might better to check if each lwip function call returns error or not, as I got over the Mbed's buffer size problem before.

@takasehideki

Copy link
Copy Markdown
Member

Hi @smoriemb
I've been considering how to handle this PR.
The operation in ASP3 version has not been confirmed yet, but it works fine in the Mbed version. Being able to communicate with Foxy is a big step forward.

So, I decided to merge this PR. And I will create the issue for the ASP3 version and tackle it individually.

I'm sorry for the late decision. I hope that you will continue to contribute to this repository in the future.

@takasehideki

Copy link
Copy Markdown
Member

@smoriemb I got it! The cause in ASP3 version is the size of each pbuf in the pool. We can communicate with Foxy nodes now!
mROS-base/mros2-asp3-f767zi@a069b7d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants