BCLab-UNM / SC2

Swarmathon Team Code for the NASA Space Challenge 2 Competition
MIT License
2 stars 0 forks source link

Setup basic docker build and run scripts #186

Closed johncarl81 closed 3 years ago

johncarl81 commented 3 years ago

Description

This PR sets up a development docker environment for the swarmathon team to develop in a common environment. Here we use docker to produce a container for our ros controllers to run, which interfaces to the srcp2 docker container via the srcp2net network and the hosted roscore.

build.sh builds this container by setting up the necessary system dependencies, sets up the ROS and srcp2 dependencies and builds the project.

runREPL.sh runs the container with a mapped directory so development may be done locally with the docker container drawing off of those files. This allows a python repl to aid in rapid development.

To test run the following:

./build.sh

then to run the REPL:

./runREPL.sh

Implements: https://github.com/BCLab-UNM/SC2/issues/182

Carter90 commented 3 years ago

So I was able to build but when I try to do ./runREPL.sh I get on 07b69270c4efe52710eae0697c18b5e3019fc187

process[small_scout_1/odom-20]: started with pid [352]
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 465, in _get_service_uri
    self.uri = master.lookupService(self.resolved_name)
  File "/opt/ros/noetic/lib/python3/dist-packages/rosgraph/masterapi.py", line 327, in lookupService
    return self._succeed(self.handle.lookupService(self.caller_id, service))
  File "/opt/ros/noetic/lib/python3/dist-packages/rosgraph/masterapi.py", line 154, in _succeed
    raise Error(msg)
rosgraph.masterapi.MasterError: no provider

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/SC2/devel/lib/scoot/FakeLocalization.py", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/SC2/src/scoot/src/FakeLocalization.py", line 51, in <module>
    publish_fake_odom()
  File "/SC2/src/scoot/src/FakeLocalization.py", line 15, in publish_fake_odom
    m = model_coordinates(rover_name, 'world')
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 442, in __call__
    return self.call(*args, **kwds)
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 502, in call
    service_uri = self._get_service_uri(request)
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 470, in _get_service_uri
    raise ServiceException("service [%s] unavailable"%self.resolved_name)
rospy.service.ServiceException: service [/gazebo/get_model_state] unavailable
[small_scout_1/odom-20] process has died [pid 352, exit code 1, cmd /SC2/devel/lib/scoot/FakeLocalization.py small_scout_1 __name:=odom __log:=/root/.ros/log/f8e50506-a191-11eb-ab65-0242ac120002/small_scout_1-odom-20.log].
log file: /root/.ros/log/f8e50506-a191-11eb-ab65-0242ac120002/small_scout_1-odom-20*.log
johncarl81 commented 3 years ago

Hmmm, I remember you tweaked the simulation to run it with your host networking. Is that still in place?