Ask Your Question
0

how to change wireless network when start robot with reboot machine?

asked 2018-01-25 20:42:40 -0600

dyan gravatar image

I want to change wireless network dynamically.I use robot_upstart package to automatically start the robot launch file when reboot machine. Before I want to change wireless network with command linenmcli device wifi connect <SSID> password <PASSWORD> everything is good.I have tried subprocess,envoy and os.system in my python scripts,they are work well with roslaunch,but they are all not work with the service generated by robot_upstart.But I have tried manually write the scripts into service file,it can change wireless network.Is there something wrong with nmcli and robot_upstart?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-01-26 01:54:21 -0600

mgruhler gravatar image

Typically, those things somehow have to do with the permissions.

To quote the docs:

It’s important to understand how permissions work robot_upstart:

1.The upstart job invokes its jobname-start bash script as root.

2.The script sets up environment variables, and then uses setuidgid to execute roslaunch as an unprivileged user. This is by default the user who ran the install script, but it can also be specified explicitly via a flag.

3.The roslaunch which executes does not have its user’s group memberships. This means that it will not have access to serial ports with the dialout group, or locations in /var/log owned by root, etc. Any filesystem resources needed by your ROS nodes should be chowned to the same unprivileged user which will run ROS, or should set to world readable/writeable, for example using udev.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-01-25 20:42:40 -0600

Seen: 76 times

Last updated: Jan 26 '18