I am trying to use Julia to automate an interface with a server running ROS. To do this I need to source some environment variables:
export ROS_MASTER_URI=http://xxx.xxx.xxx.xxx:xxxxx export ROS_IP=xxx.xxx.xxx.xxx export ROS_HOSTNAME=xxx.xxx.xxx.xxx
where the xxx’s are digits for IP addresses and port numbers.
If I run these commands in the terminal, I can thereafter run commands like
rostopic list and receive the expected output.
ENV["ROS_MASTER"] = "http://xxx.xxx.xxx.xxx:xxxxx" etc. in my script and then running
run(`rostopic list`) errors out with “ERROR: Unable to communicate with master!” and a pipeline_error.
I also tried putting the export commands into my .bashrc and in my .juliarc.jl. These didn’t fix it either.
Is there something I am missing?