strands-project / strands_morse Goto Github PK
View Code? Open in Web Editor NEWA MORSE-based simulation for the STRANDS project
A MORSE-based simulation for the STRANDS project
Environments without light source:
Improving a robot model to have more realistic model
To avoid commands with many arguments like rosrun strand_morse simulator.sh tum_kitchen default-with-kinect.py
simple wrapper launch files should be added for convenience.
DWA planner always fails for me in simulation. The output is repeated pairs of:
[ WARN] [1399971614.546500000]: DWA planner failed to produce path.
[ INFO] [1399971615.044754000]: Got new plan
This is just launching this the cs_lg env plus scitos_2d_nav. Do i need a special nav launch for simulation or should the normal one work?
rosservice call /emergency_stop
doesn't stop the robot in simulation
10x faster than real-time works in principle
observations:
place_camera
is deprecated, use set_camera_location
instead
aim_camera
is deprecated, use set_camera_rocation
instead
Has to be added to run dependencies.
topic_republisher has to be moved to strands_apps.
Due to a bug in MORSE, the depth camera point cloud is upside down with the latest URDF from scitos_description. I've already reported the bug to the MORSE developers.
As a workaround you can use an old version of the URDF:
$ roscd scitos_description
$ git checkout b15a539c4f7c250b6526b4460837da4b396fc9c3
To make long-term patrolling in simulation more effective, it would be great to have people in the simulation. If anyone is able to start implementing this, please claim this issue ;)
this should be a <run_depend>
Hi
We were following the instructions on the Hydro Installation Instructions Wiki in order to install MORSE (step 2 - the steup.sh
script). However, when we tried to run sth like
roslaunch strands_morse bham_cs_morse.launch env:=cs_1
we get an error message saying:
... logging to /home/lukas/.ros/log/d1d72d00-05bb-11e4-b511-208984d6462f/roslaunch-ThinkPad-S5-S531-14866.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
DEPRECATED IN HYDRO:
The <include> tag should be prepended with 'xacro' if that is the intended use
of it, such as <xacro:include ...>. Use the following script to fix incorrect
xacro includes:
sed -i 's/<include/<xacro:include/g' `find . -iname *.xacro`
started roslaunch server http://ThinkPad-S5-S531:33347/
SUMMARY
========
PARAMETERS
* /joint_state_publisher/source_list
* /robot_description
* /rosdistro
* /rosversion
NODES
/
chest_calibration_publisher (calibrate_chest/chest_calibration_publisher)
joint_state_publisher (joint_state_publisher/joint_state_publisher)
ptu_jointstate_republisher (topic_republisher/republish_ptu_jointstate.py)
robot_pose_publisher (robot_pose_publisher/robot_pose_publisher)
robot_state_publisher (robot_state_publisher/state_publisher)
scitos_node (strands_morse/scitos_node.py)
strands_morse (strands_morse/simulator.sh)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[joint_state_publisher-1]: started with pid [14888]
process[robot_state_publisher-2]: started with pid [14891]
process[robot_pose_publisher-3]: started with pid [14949]
process[chest_calibration_publisher-4]: started with pid [14969]
process[scitos_node-5]: started with pid [14988]
[INFO] [WallTime: 1404741659.949839] [0.000000] Starting fake scitos_node
process[ptu_jointstate_republisher-6]: started with pid [15005]
[INFO] [WallTime: 1404741660.237608] [0.000000] /ptu_jointstate_republisher setting up
process[strands_morse-7]: started with pid [15020]
Running morse on /home/lukas/strands_project/strands_catkin_ws/src/strands_morse/bham with PYTHONPATH=/home/lukas/strands_project/strands_catkin_ws/src/strands_morse/bham/src:/home/lukas/strands_project/strands_catkin_ws/src/strands_morse/strands_sim/src:/home/lukas/strands_project/strands_catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/hydro/lib/python2.7/dist-packages:/home/lukas/strands_project/morse/lib/python3.3/dist-packages and MORSE_RESOURCE_PATH=/home/lukas/strands_project/strands_catkin_ws/src/strands_morse:/home/lukas/strands_project/strands_catkin_ws/src/strands_morse/strands_sim/data:/home/lukas/strands_project/strands_catkin_ws/src/strands_morse/strands_sim/robots:/home/lukas/strands_project/strands_catkin_ws/src/strands_morse/bham/data:
* Using environment <bham>.
* Adding </home/lukas/strands_project/strands_catkin_ws/src/strands_morse/bham> to PYTHONPATH and MORSE_RESOURCE_PATH.
* Loading simulation </home/lukas/strands_project/strands_catkin_ws/src/strands_morse/bham/cs_1.py>.
* morse 1.0-250-g9ad97
connect failed: No such file or directory
found bundled python: /home/lukas/strands_project/morse/opt/blender/2.65/python
read blend: /home/lukas/strands_project/morse/share/morse/data/morse_default_autorun.blend
strands_sim.robots.scitosA5.Scitosa5: no interfaces available for this component! Check builder/data.py.
bham.actuators.platform.Platform: no interfaces available for this component! Trying to use default one for socket.
[ERROR][MORSE] Your builder script is invalid!
File "/home/lukas/strands_project/strands_catkin_ws/src/strands_morse/bham/cs_1.py", line 28, in <module>
env = Environment(model_file,fastmode=False)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/morse/builder/environment.py", line 29, in __init__
self._handle_default_interface()
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/morse/builder/environment.py", line 149, in _handle_default_interface
child.add_stream(component.default_interface)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/morse/builder/abstractcomponent.py", line 332, in add_stream
klass = get_class(classpath)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/morse/helpers/loading.py", line 11, in get_class
klass = load_module_attribute(module_name, class_name)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/morse/helpers/loading.py", line 23, in load_module_attribute
__import__(module_name)
File "/home/lukas/strands_project/strands_catkin_ws/src/strands_morse/bham/src/bham/actuators/slidingdoor.py", line 11, in <module>
from morse.middleware.ros_request_manager import ros_action, ros_service,MorseAnyService
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/morse/middleware/ros_request_manager.py", line 11, in <module>
import roslib; roslib.load_manifest('rospy'); roslib.load_manifest('actionlib_msgs')
File "/opt/ros/hydro/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest
sys.path = _generate_python_path(package_name, _rospack) + sys.path
File "/opt/ros/hydro/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path
m = rospack.get_manifest(pkg)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/rospkg-1.0.20-py3.3.egg/rospkg/rospack.py", line 133, in get_manifest
return self._load_manifest(name)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/rospkg-1.0.20-py3.3.egg/rospkg/rospack.py", line 172, in _load_manifest
retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/rospkg-1.0.20-py3.3.egg/rospkg/rospack.py", line 162, in get_path
self._update_location_cache()
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/rospkg-1.0.20-py3.3.egg/rospkg/rospack.py", line 145, in _update_location_cache
list_by_path(self._manifest_name, path, cache)
File "/home/lukas/strands_project/morse/lib/python3.3/site-packages/rospkg-1.0.20-py3.3.egg/rospkg/rospack.py", line 60, in list_by_path
root = ElementTree(None, os.path.join(d, PACKAGE_FILE))
File "/home/lukas/strands_project/morse/lib/python3.3/xml/etree/ElementTree.py", line 618, in __init__
self.parse(file)
File "/home/lukas/strands_project/morse/lib/python3.3/xml/etree/ElementTree.py", line 1730, in parse
self._root = parser._parse(source)
no element found: line 1, column 0
[strands_morse-7] process has died [pid 15020, exit code 255, cmd /home/lukas/strands_project/strands_catkin_ws/src/strands_morse/simulator.sh bham cs_1.py __name:=strands_morse __log:=/home/lukas/.ros/log/d1d72d00-05bb-11e4-b511-208984d6462f/strands_morse-7.log].
log file: /home/lukas/.ros/log/d1d72d00-05bb-11e4-b511-208984d6462f/strands_morse-7*.log
Does anybody know the error or can help us finding the cause of the error? Thanks!
Some people reported to have problems with move_base
in the uol mht environment. The robot would only spin in place but never move. I cannot reproduce the error but maybe someone has an idea? @kunzel maybe?
This is different from how the actual laser behaves. We should probably have a constant intensity in the laser messages in simulation. See example of simulation laser message below:
header:
seq: 12
stamp:
secs: 1425722175
nsecs: 704088211
frame_id: /base_laser_link
angle_min: -1.57079637051
angle_max: 1.57079637051
angle_increment: 0.0174532923847
time_increment: 0.000138888892252
scan_time: 1.0
range_min: 0.300000011921
range_max: 30.0
ranges: [0.7400559782981873, ... , 5.430670261383057]
intensities: []
The intensities vector should be as long as the ranges.
currently, we still have different topics in simulation and reality, e.g. /camera/depth/points
and /videocam/image
'/odom' reports a very small non-zero y velocity when driving normally. When sliding along an object it reports higher velocities. It should always report zero since this is how the real-world scitos behaves.
This interferes with the DWA planner, and may be related to #66.
The morse-blender-bundle package uses the newest version of morse where the humanarmature has been changed. Therefore if strands_morse
is run with the human enabled, it will crash with an error that the humanarmature cannot be loaded. (This doesn't happen if you use the old strands way of installing it.)
We'll use the normal blender human until it has been migrated.
This package should depend on the actual morse-blender-2.65-py-3.3
as a run dependency.
As other components such as the autonomous docking and patrolling rely more and more on the topics and services provided by the scitos_drives package they become incompatible with the simulation.
In the end we want to run the same control program on both the real robot and the simulated one. So, basically all topics and services should also be provided by the simualtion.
@cburbridge, do you have a good idea how to provide the services regarding the motor?
I would like to test the people detection in simulation as well, so I had a look at what morse is offering. It seems there are a few discrepancies:
Kinect:
header:
seq: 580271
stamp:
secs: 1376906509
nsecs: 211710102
frame_id: /head_xtion_rgb_optical_frame
height: 480
width: 640
encoding: bgr8
is_bigendian: 0
step: 1920
data: [...]
Morse:
header:
seq: 8502
stamp:
secs: 1376906403
nsecs: 950938940
frame_id: /head_xtion_rgb_optical_frame/base_image
height: 256
width: 256
encoding: rgba8
is_bigendian: 0
step: 1024
data: [...]
Kinect:
header:
seq: 7767413
stamp:
secs: 1376907007
nsecs: 114224
frame_id: /head_xtion_rgb_optical_frame
height: 480
width: 640
distortion_model: plumb_bob
D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [525.0, 0.0, 319.5, 0.0, 525.0, 239.5, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [525.0, 0.0, 319.5, 0.0, 0.0, 525.0, 239.5, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: False
Morse:
header:
seq: 3426
stamp:
secs: 1376906989
nsecs: 161215782
frame_id: /head_xtion_rgb_optical_frame/base_image
height: 256
width: 256
distortion_model: plumb_bob
D: []
K: [280.0, 0.0, 128.0, 0.0, 280.0, 128.0, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [280.0, 0.0, 128.0, 0.0, 0.0, 280.0, 128.0, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: False
If any one knows how to fix this the easiest, I am happy to provide help where I can because I think I am not the only one who would needs this kind of data in the future.
The morse-blender package can not be found:
sudo apt-get install morse-blender-2.65-py-3.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package morse-blender-2.65-py-3.3
E: Couldn't find any package by regex 'morse-blender-2.65-py-3.3'
Am I missing a repository entry?
When bringing up strands_morse (regardless of environment) on Ubuntu 14.04 (or rather Linux Mint 17) it gives the following error whenever it would subscribe to a topic:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_pubsub.py", line 168, in robust_connect_subscriber
conn.connect(dest_addr, dest_port, pub_uri, timeout=60.)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 524, in connect
if not rosgraph.network.is_local_address(dest_addr):
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 176, in is_local_address
local_addresses = ['localhost'] + get_local_addresses()
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 218, in get_local_addresses
import netifaces
ImportError: No module named 'netifaces'
This was fixed by installing the python3-netifaces debian package. Everything looked fine but obviously there was no communication between morse and the ROS stuff (hence the robot didn't move in any nav2d environment even though valid plans and velocities were given). Thanks to @marc-hanheide for figuring it out.
Our robot model needs at least one RGB-D camera. It could be in a fixed position to start, but ideally on a PTU.
At least this is what I observed.
I tried to add a human to our simulation using human=Human()
but it fails with the following message
[ERROR][MORSE] Your builder script is invalid!
File "/opt/strands/lib/python3.3/site-packages/morse/blender/human_interaction/human_control.py", line 549, in rotate
pos = scene.objects['POS_EMPTY' + suffix]
Any idea about that? I checked that there is a POS_EMPTY object in Human.blend, so I don't know what's going wrong. Before I bother the morse people, I thought you might have an idea.
The navigation in the simulation environment doesn't work properly in indigo. The robot generates the plan and rotates towards the goal normally, but then in it doesn't move forward. /cmd_vel
looks like this:
linear:
x: 0.100002683699
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
If i drive him in blender towards the goal it will then rotate into position and achieve the goal, so it's some weird thing with the linear velocities
Is there any way to move the PTU unit in simulation?
install targets are missing form CMakeLists.txt
...
I want to reiterate how important it is to test catkin_make install
before releasing packages...
The multi-floor CS model is cool, but I find it a bit hard to navigate and view. Please could we have a single-floor version for initial use?
Currenty the naming of the different files is a little bit confusion, in particular with the different levels of the bham_cs building. All files related to the same level should have a common prefix.
Morse regularly won't start because of a bug related to the video camera. It starts up, but then just after the scene is initialised it crashes:
[SCENE INITIALIZED]
[ 2.498] [sensors.camera] Focal length of the camera is: 35.0
[ 2.498] [sensors.camera] Near clipping distance of the camera is: 0.10000000149011612
[ 2.498] [sensors.camera] Far clipping distance of the camera is: 100.0
[ 2.498] [sensors.camera] Camera 'robot.ptu.videocam': Exporting an image of capsize: (640, 480) pixels
Traceback (most recent call last):
File "/opt/strands/lib/python3.3/site-packages/morse/blender/calling.py", line 47, in component_action
cmpt_object.action()
File "/opt/strands/lib/python3.3/site-packages/morse/core/sensor.py", line 79, in action
function(self)
File "/opt/strands/lib/python3.3/site-packages/morse/middleware/ros/video_camera.py", line 43, in default
image.data = bytes(image_local)
TypeError: 'NoneType' object is not iterable
This happens most times, but if I keep restarting eventually I get going.
Does anybody know why the Markdown code elements such as '$ rosrun ...' are not visualized properly in the Readme.md? Or is the formatting wrong?
we haven't released this package for indigo yet, and sudo apt-get install morse-blender-2.65-py-3.3
doesnt work in 14.04 either. Anyone knows how to get morse properly installed in 14.04?
it has been created (3rd floor only) and also mapped, but needs to be properly integrated into the strands_morse structure
The STRANDS robot bringup provides the following node which is missing from the simulated robot.
<node name="ptu_action_server" pkg="flir_pantilt_d46" type="ptu_action_server.py" output="screen">
<remap from="cmd" to="/ptu/cmd"/>
<remap from="state" to="/ptu/state"/>
</node>
While /head_xtion/rgb/image_mono
works, /head_xtion/rgb/image_color
never sends any data...
needed for the *_nav2d.launch
files
fastmode=False
fastmode=True
both above with a human included
Add battery model to robot and define charging point in existing sim models (perhaps these should be additional issues).
The CMakeLists.txt does not contain any install targets. Therefore, the debian package is empty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.