Skip to content

Commit

Permalink
Rebase from 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
strands-jenkins committed Sep 30, 2018
1 parent 805d6d7 commit fe28b4d
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ Changelog for package strands_morse
* Switch to system python3.
* Contributors: Chris Burbridge

0.2.3 (2018-09-30)
------------------
* Merge pull request `#175 <https://github.com/strands-project/strands_morse/issues/175>`_ from francescodelduchetto/kinetic-devel
the collection museum simulation
* simulation scaled according to real-world measures
* better lights for simulation
* the collection museum simulation
* Contributors: Marc Hanheide, francescodelduchetto

0.2.2 (2017-09-03)
------------------

Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ install(DIRECTORY tsc
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

install(DIRECTORY collection
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)


# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/groovy/api/catkin/html/adv_user_guide/variables.html
Expand Down
37 changes: 37 additions & 0 deletions collection/collection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#! /usr/bin/env morseexec

""" Basic MORSE simulation scene for <strands_sim> environment
Feel free to edit this template as you like!
"""
import math
from morse.builder import *
from strands_sim.builder.robots import Scitosa5

#robot = Ranger()
robot = Scitosa5(with_cameras=Scitosa5.WITH_OPENNI)

robot.translate(x=8.6, y=4, z=1)
#robot.translate(x=1, y=7.62, z=0.0)
robot.rotate(0, 0, 3.141592)

# Battery discharging rate, in percent per seconds
# The bateery state is published to /battery
robot.battery.properties(DischargingRate=0.015)

docking_station = PassiveObject('strands_sim/robots/docking_station.blend','dockingStation')
docking_station.properties(Object = True)
docking_station.properties(ChargingZone = True)
docking_station.translate(8.4, 4, 0.385)
docking_station.rotate(0, 0, math.pi + 0.2)

docking_station_label = PassiveObject('strands_sim/robots/docking_station_label.blend','dockingStationLabel')
docking_station_label.properties(Object = True)
docking_station_label.translate(8.3, 4, 1.75)
docking_station_label.rotate(math.pi/2, 0, math.pi/2 + 0.17)

# Set the environment
model_file=os.path.join(os.path.dirname(os.path.abspath( __file__ )),'data/thecollectionscaled.blend')
env = Environment(model_file,fastmode=False)
env.set_camera_location([7.0, 15.0, 15.0])
env.set_camera_rotation([math.pi/6, 0, math.pi])
37 changes: 37 additions & 0 deletions collection/collection_fast.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#! /usr/bin/env morseexec

""" Basic MORSE simulation scene for <strands_sim> environment
Feel free to edit this template as you like!
"""

from morse.builder import *
from strands_sim.builder.robots import Scitosa5

#robot = Ranger()
robot = Scitosa5(with_cameras=Scitosa5.WITHOUT_CAMERAS)

robot.translate(x=8.6, y=4, z=1)
#robot.translate(x=1, y=7.62, z=0.0)
robot.rotate(0, 0, 3.141592)

# Battery discharging rate, in percent per seconds
# The bateery state is published to /battery
robot.battery.properties(DischargingRate=0.01)

docking_station = PassiveObject('strands_sim/robots/docking_station.blend','dockingStation')
docking_station.properties(Object = True)
docking_station.properties(ChargingZone = True)
docking_station.translate(8.4, 4, 0.385)
docking_station.rotate(0, 0, math.pi + 0.2)

docking_station_label = PassiveObject('strands_sim/robots/docking_station_label.blend','dockingStationLabel')
docking_station_label.properties(Object = True)
docking_station_label.translate(8.3, 4, 1.75)
docking_station_label.rotate(math.pi/2, 0, math.pi/2 + 0.17)

# Set the environment
model_file=os.path.join(os.path.dirname(os.path.abspath( __file__ )),'data/thecollectionscaled.blend')
env = Environment(model_file,fastmode=True)
env.set_camera_location([7.0, 15.0, 15.0])
env.set_camera_rotation([math.pi/6, 0, math.pi])
Binary file added collection/data/thecollection.blend
Binary file not shown.
Binary file added collection/data/thecollectionscaled.blend
Binary file not shown.
9 changes: 9 additions & 0 deletions collection/launch/collection_morse.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<launch>
<arg name="env" default="collection"/>

<!-- Scitos robot -->
<include file="$(find strands_morse)/launch/scitos.launch"/>

<node pkg="strands_morse" type="simulator.sh" respawn="false" name="strands_morse" output="screen" args="collection $(arg env).py"/>
<node pkg="strands_morse" type="human_pose_simulator.py" respawn="true" name="human_pose_simulator" output="screen"/>
</launch>
15 changes: 15 additions & 0 deletions collection/launch/collection_nav2d.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<launch>
<!-- declare arg to be passed in -->
<arg name="env" default="collection1-cropped"/>
<arg name="with_chest_xtion" default="false"/>


<!-- 2D Navigation -->
<include file="$(find strands_movebase)/launch/movebase.launch">
<arg name="map" value="$(find strands_morse)/collection/maps/$(arg env).yaml"/>
<arg name="with_chest_xtion" value="$(arg with_chest_xtion)"/>
</include>

<node name="static_transform_publisher" pkg="tf" type="static_transform_publisher" args="-11 -2.5 0.1 0 0 3.141592 0 /world /map 100"/>

</launch>
Binary file added collection/maps/collection1-cropped.pgm
Binary file not shown.
Binary file added collection/maps/collection1-cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions collection/maps/collection1-cropped.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
free_thresh: 0.196
image: collection1-cropped.pgm
negate: 0
occupied_thresh: 0.65
origin: [-47.85, -23.05, 0.0]
resolution: 0.05
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>strands_morse</name>
<version>0.2.2</version>
<version>0.2.3</version>
<description>The strands_morse package</description>

<maintainer email="[email protected]">Marc Hanheide</maintainer>
Expand Down

0 comments on commit fe28b4d

Please sign in to comment.