Is this the right way to run container/ROS?

Viewed 76

Recently i was curious about ROS. I did some tutorials, and i managed to start ROS successfully. While learning about ROS, I additionally looked about "Python API", "Docker", etc. I am sittig with this piece of code cannot find any examples in web...

I wondered if it was possible to run (docker container --> /run.sh --> roslaunch command) with one python script ?

#!/usr/bin/env python

import docker
import roslaunch
import rospkg

client = docker.from_env()
client.login()
client.containers.run("url_to_container")

launch= roslaunch.scriptapi.ROSLaunch()
launch.start()
0 Answers
Related