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

Is there any way to let controller node the other site from simulator including state publisher ? #88

Open
swgu931 opened this issue Dec 10, 2021 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@swgu931
Copy link

swgu931 commented Dec 10, 2021

I want to try to test wireless network performance with inverted pendulum, I believe it could be intuitive perception and understanding in case that the controller signal coming into pendulum would be come from sever side, let's say cloud.

So I am looking for the way to let controller node the other location but in the same network at the moment, for this time making the problem be simple.
how to make it to launch controller node in the host computer A, the other nodes in the host computer B ?

I hope this description can be clear to you and help me.

Thanks
Sean,

@carlossvg carlossvg self-assigned this Feb 5, 2022
@carlossvg carlossvg added the question Further information is requested label Feb 5, 2022
@carlossvg
Copy link
Contributor

Hi @swgu931, you could do this by running each executable in separate processes. Instead of using the pendulum demo bringup or the ros2 run pendulum_demo pendulum_demo command you will have to run the standalone driver and controller executables. For example, you can run the controller in host computer A as follows:

ros2 run pendulum_controller pendulum_controller_exe --priority 80 --cpu-affinity:=4 --lock-memory-size 100 --config-child-threads True

Hope this helps.

@swgu931
Copy link
Author

swgu931 commented Feb 7, 2022

First of all, I appreciate your work which help me to develop something, which is not that real-time thing though.

I did try what you recommended as a example on the docker built by me

ros2 run pendulum_controller pendulum_controller_exe --priority 80 --cpu-affinity:=4 --lock-memory-size 100 --config-child-threads True

However it won't works, it showed up the error below.

root@pendulum-robot-all:~/ros2_ws# ros2 run pendulum_controller pendulum_controller_exe
[INFO] [1644217416.785463936] [pendulum_demo]: expected [string] got [not set]
root@pendulum-robot-all:~/ros2_ws# ros2 run pendulum_controller pendulum_controller_exe --priority 80 --cpu-affinity:=4 --lock-memory-size 100 --config-child-threads True
[INFO] [1644217483.492888621] [pendulum_demo]: expected [string] got [not set]
root@pendulum-robot-all:~/ros2_ws# 

Aside from this work, I did two docker images for controller and model to be isolated, it works perfectly because the one built with ROS2 packages excluded the other, for example, model image don't include controller packages.
I will test more then I will uploaded into docker hub and brief manual.

Thanks for your help.

@carlossvg
Copy link
Contributor

You have to pass the parameter file too:

ros2 run pendulum_controller pendulum_controller_exe --priority 80 --cpu-affinity:=4 --lock-memory-size 100 --config-child-threads True
 --ros-args --params-file src/pendulum/pendulum_bringup/params/pendulum.param.yaml

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants