Welcome to my blog. Built with HTML in Pittsburgh, PA.
Since ROS Kinetic (Ubuntu 16.04), roslaunch allows you to eval arbitrary Python expressions.
For example, you can do something like the below to manipulate parameters found in two different files.
Something I've always wanted to do is to check for the existence of a file. However, since the os module has not been imported in roslaunch's eval environment, this seems impossible to do. Furthermore, roslaunch explicitly forbids double underscores, precluding the use of an expression import with __import__. However, it does so by searching for "__"! See line 345 at the roslaunch source, which references https://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html
We can get around this by nesting evals and creating the __import__ double underscore method using string addition.
If pin 1 is the GND pin for both the Molex Pico (plugging into J7) and the JST GH (plugging into a UART on the Pixracer), then pin 2 on J7 connects to pin 5 on the JST GH and pin 3 on the J7 connects to pin 4 on the JST GH.
To talk to this port from Linux, you may need to use /dev/ttyTHS1 or /dev/ttyTHS3.