This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| # run blender -b -P helper.py | |
| import sys | |
| sys.path.append("/usr/local/lib/python3.3/site-packages") | |
| os.environ['MORSE_ROOT'] = "/usr/local" | |
| from morse.builder import * | |
| from morse.builder.creator import * | |
| for category in ['actuators', 'robots', 'sensors']: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| files=$(grep -F ".configure_mw(" . -lr --exclude="$0" --exclude="*.pyc" \ | |
| --exclude="*.blend" --exclude-dir="build" --exclude-dir=".git") | |
| for f in $files; do | |
| sed -i 's/.configure_mw(/.add_stream(/g' $f | |
| done | |
| echo "done" | |
| grep "configure_mw" . -lr --exclude="*.pyc" --exclude-dir="build" \ | |
| --exclude-dir=".git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| STR_ORIG="_blendobj" | |
| STR_REPL="_blender_object" | |
| files=$(grep -rlF "${STR_ORIG}" . --include=*.{py,rst} --exclude-dir="build" --exclude-dir=".git") | |
| # --exclude="${0}" --exclude="*.pyc" --exclude="*.blend" | |
| for f in $files; do | |
| sed -i "s/${STR_ORIG}/${STR_REPL}/g" $f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float Znear = 1.0; | |
| float Zfar = 20.0; | |
| float Q = Zfar / ( Zfar - Znear ); | |
| float inv_Zfar = 1.0 / Zfar; | |
| uniform sampler2D bgl_DepthTexture; | |
| void main() | |
| { | |
| // Sampling | |
| float depth = texture2D(bgl_DepthTexture, gl_TexCoord[0].xy).r; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Publisher demo | |
| """ | |
| import rospy | |
| from std_msgs.msg import String | |
| rospy.init_node('my_second_node_description') | |
| topic_name = "/test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| replace() { | |
| old=$1 | |
| new=$2 | |
| files=$(grep -rl "$old" . --exclude="*.pyc" --exclude="*.bash" \ | |
| --exclude-dir="build" --exclude-dir=".git") | |
| for f in $files; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import inspect | |
| def get_class_from_module(module_name): | |
| __import__(module_name) | |
| # Predicate to make sure the classes only come from the module in question | |
| def predicate(member): | |
| return inspect.isclass(member) and member.__module__.startswith(module_name) | |
| # fetch all members of module name matching 'pred' | |
| classes = inspect.getmembers(sys.modules[module_name], predicate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import pkgutil | |
| import inspect | |
| def get_classes_from_module(module_name): | |
| __import__(module_name) | |
| # Predicate to make sure the classes only come from the module in question | |
| def predicate(member): | |
| return inspect.isclass(member) and member.__module__.startswith(module_name) | |
| # fetch all members of module name matching 'pred' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Package: morse-ros | |
| Version: 1.0~beta-1~exp1ubuntu2 | |
| Architecture: all | |
| Maintainer: MORSE Developers <morse-dev@laas.fr> | |
| Depends: morse-simulator, ros-fuerte-ros-comm | ros-groovy-ros-comm, ros-fuerte-common-msgs | ros-groovy-common-msgs, ros-fuerte-pr2-common | ros-groovy-pr2-common, ros-fuerte-pr2-controllers | ros-groovy-pr2-controllers | |
| Recommends: morse-simulator-doc | |
| Section: science | |
| Priority: extra | |
| Homepage: http://morse.openrobots.org/ | |
| Description: Multi-OpenRobot Simulation Engine, ROS interfaces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Run the following commands:: | |
| export PYTHONPATH=/usr/local/lib/python3.3/site-packages/:$PYTHONPATH | |
| blender /usr/local/share/morse/data/morse_default.blend -P morse_wargs.py -- 5 | |
| """ | |
| from morse.builder import * | |
| def import_atrv(mw): | |
| # Append ATRV robot to the scene |