Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Envire managers #45

Open
wants to merge 128 commits into
base: develop
Choose a base branch
from
Open
Changes from 9 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
5b56278
Include envire_sensors in the dependencies and a script to test the e…
Rauldg Apr 18, 2016
fa3e7e4
Script for testing the current mars implementation
Rauldg Apr 25, 2016
a002f2c
IMU works in the new Envire-Mars
Rauldg Apr 27, 2016
754f61f
added support for passive joints
planthaber Apr 29, 2016
0fb00f1
c++ 11 flag
Rauldg May 18, 2016
9c36829
The robot can move now
Rauldg May 18, 2016
2a0b181
make compile
May 30, 2016
ae70ce2
Support for passive joints
Rauldg May 31, 2016
36d4499
The test script for the simulation is updated.
Rauldg May 31, 2016
3f9f392
Fix joints update has to be performed before reading
Rauldg Jun 1, 2016
5902157
Merge remote-tracking branch 'rock-simulation/master' into envire-mars
Rauldg Jun 1, 2016
38a50fd
IMU using Envire Mars
Rauldg Jun 1, 2016
48488ea
getSimJoint is called for motors and also for passive joints
Rauldg Jun 1, 2016
f144098
Corrected configuration of the velodyne
Rauldg Jun 1, 2016
0541e30
Merge remote-tracking branch 'rock-simulation/master' into envire-mars
Rauldg Jun 13, 2016
7b3c8c7
Remove some tasks references in the .orogen which were introduced for…
Rauldg Jun 16, 2016
cdefc17
depends on the envire_graphics plugin
Rauldg Jun 16, 2016
c880120
No odometry task in the scripts
Rauldg Jun 16, 2016
d2eece7
Require control skid4_control for one of the tests
Rauldg Jun 16, 2016
3019930
fix build warning
Jun 17, 2016
87b229c
use new base types
Jun 17, 2016
4696567
remove not needed dependency
Jun 17, 2016
ff53667
Load the dlr scene in the test script named simulation
Rauldg Jul 5, 2016
3d83357
Use the not deprecated Logging header
Rauldg Jul 14, 2016
2b6a670
An initial translation command is given to the simulation to test tha…
Rauldg Jul 14, 2016
215b86c
Avoid warning due to redefinition of LOG_DEBUG etc.
Rauldg Aug 15, 2016
87ededa
Avoid warning in conversion from string to char*
Rauldg Aug 15, 2016
23588f3
Don't use deprecated function setValue, but setControlValue
Rauldg Aug 15, 2016
26f7f0c
Provide Depthmaps, misses to be a configurable selection.
Rauldg Aug 18, 2016
f096c6a
Merge remote-tracking branch 'autobuild/envire-mars'
Rauldg Aug 18, 2016
c834524
Merge remote-tracking branch 'autobuild/VelodyneDepthMap'
Rauldg Aug 18, 2016
42aa196
Mars config initial scene fixed. Before was loading two.
Rauldg Aug 19, 2016
6d97099
Revert "Provide Depthmaps, misses to be a configurable selection."
Rauldg Aug 19, 2016
8681a73
Property robot_model to load the robot in the simulation given via co…
Rauldg Aug 30, 2016
6039ea9
Revert "Revert "Provide Depthmaps, misses to be a configurable select…
Rauldg Aug 30, 2016
ceb9b53
Release the SMURFToSimulation library in the cleanuphook.
Rauldg Aug 30, 2016
0c576a4
Now the robot model path is passed to the simulator via config. The t…
Rauldg Aug 30, 2016
60bc49e
Some test for crex model and for crex with velodyne.
Rauldg Sep 1, 2016
1eb3e88
do not export ControlCenter.h to task interface
Sep 2, 2016
3938ddb
forward task properties to sensor instance
saarnold Sep 6, 2016
a437f1e
bugfix: Fill mars_ids before registering the plugin
Sep 7, 2016
a18f14a
removed testing deployments, use the ones in entern/orogen/entern
Sep 9, 2016
19bcc6c
Fix scripts after removed deployments.
Rauldg Sep 12, 2016
e5a4b14
Merge remote-tracking branch 'rock-simulation/master'
Rauldg Sep 12, 2016
cad7fdb
call SmurfToSimulation plugin through mars
annaborn Sep 16, 2016
db9492b
rename smurftosimulation into envire_smurf_loader and clean the task
annaborn Sep 16, 2016
a6c4f09
add joint6dof sensor into crex_simulation script
annaborn Sep 22, 2016
d04ea66
add crex legs to the script
annaborn Sep 22, 2016
6a050ee
no_gui option reworked
Rauldg Sep 27, 2016
b721344
Script to run asguard with velodyne for testing the no_gui option
Rauldg Sep 27, 2016
d22d5a6
Rework of setShow_coordinate_system
Rauldg Sep 27, 2016
0ebe511
Merge remote-tracking branch 'autobuild/master' into headless
Rauldg Sep 28, 2016
1082786
move simulation.rb to asguard_tests.rb
Rauldg Sep 29, 2016
69eec73
move crex_simulation to crex_tests, declare the deployment and add th…
Rauldg Sep 29, 2016
00f0188
small fix
annaborn Sep 29, 2016
88e2a54
change velodyne name in RotatingLaserRangeFinder
annaborn Sep 30, 2016
77f606e
activate gui by default
annaborn Sep 30, 2016
893e371
clean scripts and configs
annaborn Sep 30, 2016
842f58d
Merge remote-tracking branch 'autobuild/headless'
Rauldg Sep 30, 2016
c399b1b
asguard_simulation replaced by asguard_tests
Rauldg Sep 30, 2016
3472cca
Merge branch 'master' of github.com:/envire/simulation-orogen-envire_…
annaborn Oct 6, 2016
981cf19
move config file
annaborn Oct 6, 2016
ee23b0e
clean mars task config
annaborn Oct 6, 2016
a4df8a7
A readme file about the scripts for testing
Rauldg Oct 11, 2016
8b5ff87
Depend also on the crex and asguard 4 robot models, just for testing …
Rauldg Oct 11, 2016
e96c824
Starting with output type via config file
Rauldg Oct 12, 2016
b2126fa
Simulated velodyne provides both types or pcl or depthmap based on co…
Rauldg Oct 14, 2016
583feeb
add min speed to pid sim motors and property
annaborn Nov 1, 2016
508efda
change name of output port for joints (from status_samples to joints_…
annaborn Nov 23, 2016
34dab99
set pose of the scene
annaborn Dec 8, 2016
2640def
set force in effort joint status
annaborn Dec 9, 2016
faf7cce
Update configs according to bundle
Rauldg Dec 12, 2016
07c0ea4
Merge remote-tracking branch 'autobuild/master'
annaborn Dec 12, 2016
e8cc413
Fix scripts mar config
Rauldg Dec 12, 2016
86f3f59
add new scene attribute in the config
annaborn Dec 13, 2016
05f88c5
Synchronize the configs of the scripts with the ones of the bundle
Rauldg Dec 16, 2016
e9f5e54
Script that set the values of the configs that are used for testing w…
Rauldg Dec 16, 2016
6b5151f
Scripts to synchronize the configs with the bundle:
Rauldg Dec 16, 2016
eefe6d1
config file for crex_simulation script updated
Rauldg Dec 16, 2016
b1f6f73
Rename orogen property scenes to scene_setup. Update asguard_test script
Rauldg Dec 19, 2016
5057c6f
gitignore some vim related files
Rauldg Jan 24, 2017
161c356
Correct sensors names, once again
Rauldg Jan 25, 2017
424c697
Correct mars::Task config
Rauldg Jan 25, 2017
a1173da
Someone renamed ports: status_samples is now joints_status
Rauldg Jan 25, 2017
8a12b89
always normalize orientation. and use slightly faster .conjugate() in…
chhtz Feb 21, 2017
8ac2e96
add gravity to accelerometer measurements and orient both sensors to …
chhtz Feb 21, 2017
d9ec73a
Merge pull request #1 from envire/fix_imu_calibrated_sensors
planthaber Feb 21, 2017
5564887
Merge branch 'master' of https://github.com/rock-simulation/simulatio…
planthaber Feb 21, 2017
bdc312a
use EnvireJointManager
annaborn Apr 10, 2017
1105d71
scene position serialisation
planthaber Apr 11, 2017
67f616c
fixed deserialite logic
planthaber Apr 21, 2017
751a1e8
serialization
planthaber Jun 21, 2017
7f40526
Started the operation to load an mls and move the robot to the given …
Rauldg Oct 7, 2017
f7dfa1a
setupMLSSimulation operation properly declared and compiled
Rauldg Oct 8, 2017
37bf934
The method that loads the mls and the robot through an operation call…
Rauldg Oct 11, 2017
4ba9bb5
Don't fail if the mls frame already exists.
Rauldg Oct 18, 2017
26dfadb
Use the method setTfToCenter which uses frames instead of node ids.
Rauldg Oct 20, 2017
c2c45fd
Joints: Add Timeout
Oct 24, 2017
2a84be1
change the type of robotpose in setupmls
annaborn Oct 27, 2017
8b0a79d
Merge branch 'envire_managers' of github.com:/envire/simulation-oroge…
annaborn Oct 27, 2017
23289bd
Set some traces for debuging
Rauldg Oct 27, 2017
7740016
Merge branch 'runSimulationOperation' into envire_managers
Rauldg Oct 27, 2017
b104aee
Make DepthCamera return a DistanceImage directly (for compatibility w…
chhtz Oct 28, 2017
5f13c5d
typo
chhtz Oct 28, 2017
7b9ca53
Working on the positioning of the robot and the MLS. Needs Fixes.
Rauldg Oct 28, 2017
0d885fb
add start and stop simulation operation
annaborn Nov 2, 2017
7f2e669
add output port for mls map and frame pose
annaborn Nov 6, 2017
daffc2c
remove stdcout in joints
annaborn Nov 7, 2017
cf11d78
send the position of the robot and get mls map operation
annaborn Nov 7, 2017
51fec6e
removed deprecated dependencies
Nov 10, 2017
61b594f
Operation to load an MLSPrecalculated
Rauldg Nov 11, 2017
be8a2a2
Mars task: Read constants from mars/sim defines file
Rauldg Nov 12, 2017
83f57b2
Bugfix in PrepareGraphForMLS
Rauldg Nov 13, 2017
0c6de57
Don't store the kalman map in the graph. The precalculated will be us…
Rauldg Nov 13, 2017
66832cf
set pose of joints over operation
annaborn Nov 14, 2017
57e48ba
Merge branch 'envire_managers' of github.com:/envire/simulation-oroge…
annaborn Nov 14, 2017
ee3a9f6
Remove the dependencies to the robot models. They were included for t…
Rauldg Sep 19, 2018
f9add22
Don't import types from pcl
Rauldg May 29, 2019
42728b2
WIP: Merge branch 'develop' into envire_managers
Rauldg Jan 17, 2022
b3bc3a4
Missing node_id attribute lost in merge and fixed indentation
Rauldg Jan 21, 2022
e6f82cb
[Buildfixes] Use the maps that are currently maintained and avoid the…
Rauldg Feb 21, 2022
423c040
[temporally commented out] IMU samples from envire graph
Rauldg Feb 21, 2022
82e0609
[temporally commented out] Laser sensor can produce different types
Rauldg Feb 21, 2022
291d631
[temporally commented code] The MLS integration features
Rauldg Feb 21, 2022
28ef795
[remove_entern_scripts] Moves out all entern scripts and sets back th…
Rauldg Mar 8, 2022
928739f
Merge pull request #6 from envire/remove_tests
Rauldg Mar 8, 2022
cb1737a
Revert "[Buildfixes] Use the maps that are currently maintained and a…
Rauldg Mar 9, 2022
ffb65bd
[envire_managers] remove at least temporaly the dependecy to pcl, sin…
Rauldg Mar 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mars.orogen
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ task_context "Task" do
property('distributed_simulation', 'bool').
doc('switch to active the distributed simulation if needed')

property('enable_gui', 'bool').
property('enable_gui', 'bool', true).
doc('start the simulation graphical interface with this module')

property('controller_port', 'int').
56 changes: 56 additions & 0 deletions scripts/asguard_simulation.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
require 'orocos'
require 'readline'
include Orocos

Orocos.initialize

Orocos.run 'asguard_tests',
"skid4_control::SimpleController" => "simple_controller",
"joint_dispatcher::Task" => "joint_dispatcher" do

mars = TaskContext.get 'mars'
mars_actuators = TaskContext.get 'mars_actuators'
sysmon = TaskContext.get 'sysmon'
joint_dispatcher = TaskContext.get 'joint_dispatcher'
xsens = TaskContext.get 'xsens'
velodyne = TaskContext.get 'velodyne'
simple_controller = Orocos.name_service.get 'simple_controller'
mars.apply_conf_file("config/mars::Task.yml", ["default", "asguard_in_dlr_scene"])
mars.configure
mars.start
mars_actuators.apply_conf_file("config/mars::Joints.yml", ["base"])
mars_actuators.configure
sysmon.apply_conf_file("config/mars::Joints.yml", ["sysmon"])
sysmon.configure
joint_dispatcher.apply_conf_file("config/joint_dispatcher::Task.yml", ["default"])
joint_dispatcher.configure
simple_controller.apply_conf_file("config/skid4_control::SimpleController.yml", ["default"])
simple_controller.configure
xsens.apply_conf_file("config/mars::IMU.yml", ["default"])
xsens.configure
velodyne.apply_conf_file("config/mars::RotatingLaserRangeFinder.yml", ["default"])
velodyne.configure
# Connections
joint_dispatcher.command_out.connect_to(mars_actuators.command, :type=>:buffer, :size=>100)
mars_actuators.status_samples.connect_to(joint_dispatcher.status_samples_in, :type=>:buffer, :size=>100)
sysmon.status_samples.connect_to(joint_dispatcher.body_joint_in, :type=>:buffer, :size=>100)
simple_controller.command.connect_to(joint_dispatcher.command, :type=>:buffer, :size=>100)
joint_dispatcher.status_samples.connect_to(simple_controller.status_samples, :type=>:buffer, :size=>100)
mars_actuators.start
sysmon.start
joint_dispatcher.start
simple_controller.start
xsens.start
velodyne.start

# To test just give a translation command
mc_writer = simple_controller.motion_command.writer()
mc_cmd = mc_writer.new_sample()
mc_cmd.translation = 0.05;
mc_cmd.rotation = 0.0;
mc_writer.write(mc_cmd)

Readline::readline("Press ENTER to quit") do
end

end
24 changes: 24 additions & 0 deletions scripts/asguard_velodyne_no_gui.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require 'orocos'
require 'readline'
include Orocos

Orocos.initialize

#Orocos.run 'just_mars', 'mars::RotatingLaserRangeFinder' => 'velodyne', :gdb=>true do
#Orocos.run 'asguard_tests', :gdb=>true do
Orocos.run 'asguard_tests' do

mars = TaskContext.get 'mars'
velodyne = TaskContext.get 'velodyne'

mars.apply_conf_file("config/mars::Task.yml", ["default", "no_gui", "asguard_in_dlr_scene"])
mars.configure
mars.start
velodyne.apply_conf_file("config/mars::RotatingLaserRangeFinder.yml", ["default"])
velodyne.configure
velodyne.start

Readline::readline("Press ENTER to quit") do
end
end

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- name:default
# Minimum valid range of the laser range finder
name: "sensor_velodyne"
name: "velodyne"
min_range: 2.0
max_range: 20.0
# Name of the RotatingRaySensor in the scene file
9 changes: 7 additions & 2 deletions scripts/mars::Task.yml → scripts/config/mars::Task.yml
Original file line number Diff line number Diff line change
@@ -13,13 +13,12 @@
#config_dir: "<%= ENV['AUTOPROJ_CURRENT_ROOT'] %>/install/configuration/mars_default/"

# some boolean settings
enable_gui: 1
#add_floor: 1
distributed_simulation: 0
realtime_calc: 1
start_sim: 1
gravity:
data: [0.0, 0.0, -9.81]
show_coordinate_system: 0

# step size in s
# sim_step_size: 0.01 geht noch nicht
@@ -30,6 +29,12 @@ raw_options: []
# set the controller port, e.g. 1600 for communication with monster
controller_port: 1600

--- name:no_gui
enable_gui: 0

--- name:yes_gui
enable_gui: 1

--- name:spaceclimber_in_empty_scene
add_floor: 1
initial_scenes: ["<%= ENV['AUTOPROJ_CURRENT_ROOT'] %>/models/robots/spaceclimber/smurf/spaceclimber.smurf",
File renamed without changes.
6 changes: 3 additions & 3 deletions scripts/crex_tests.rb
Original file line number Diff line number Diff line change
@@ -13,12 +13,12 @@
mars = TaskContext.get 'mars'
xsens = TaskContext.get 'xsens'
velodyne = TaskContext.get 'velodyne'
mars.apply_conf_file("mars::Task.yml", ["default", "crex_in_dlr_scene"])
mars.apply_conf_file("config/mars::Task.yml", ["default", "crex_in_dlr_scene"])
mars.configure
mars.start
xsens.apply_conf_file("mars::IMU.yml", ["default"])
xsens.apply_conf_file("config/mars::IMU.yml", ["default"])
xsens.configure
velodyne.apply_conf_file("mars::RotatingLaserRangeFinder.yml", ["default"])
velodyne.apply_conf_file("config/mars::RotatingLaserRangeFinder.yml", ["default"])
velodyne.configure
# Connections
xsens.start
2 changes: 1 addition & 1 deletion scripts/just_mars.rb → scripts/just_asguard.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

mars = TaskContext.get 'mars'

mars.apply_conf_file("mars::Task.yml", ["default", "asguard_in_dlr_scene"])
mars.apply_conf_file("config/mars::Task.yml", ["default", "asguard_in_dlr_scene"])
mars.configure
mars.start

2 changes: 1 addition & 1 deletion scripts/just_crex.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

mars = TaskContext.get 'mars'

mars.apply_conf_file("mars::Task.yml", ["default", "crex_in_dlr_scene"])
mars.apply_conf_file("config/mars::Task.yml", ["default", "crex_in_dlr_scene"])
mars.configure
mars.start

50 changes: 29 additions & 21 deletions tasks/Task.cpp
Original file line number Diff line number Diff line change
@@ -116,10 +116,12 @@ void* Task::startTaskFunc(void* argument)
Option confDirOption("-C", marsArguments->config_dir);
rawOptions.push_back(confDirOption);
}
bool enable_gui = true;
if(!marsArguments->enable_gui)
{
Option noGUIOption("--no-gui", "");
rawOptions.push_back(noGUIOption);
enable_gui = false;
}
char** argv = mars->setOptions(rawOptions);
int argc = mars->getOptionCount(rawOptions);
@@ -138,18 +140,21 @@ void* Task::startTaskFunc(void* argument)
// for core mars and gui
if(!Task::getTaskInterface()->app){
//Initialize Qapplication only once! and keep the instance
Task::getTaskInterface()->app = new QApplication(argc, argv);
Task::getTaskInterface()->app = new QApplication(argc, argv, enable_gui);
if (enable_gui)
{
#if QT_VERSION >= 0x050000
QStyle* style = QStyleFactory::create("plastique");
if(style)
{
Task::getTaskInterface()->app->setStyle(style);
} else {
LOG_WARN_S << "QStyle 'plastique' is not available";
}
QStyle* style = QStyleFactory::create("plastique");
if(style)
{
Task::getTaskInterface()->app->setStyle(style);
} else {
LOG_WARN_S << "QStyle 'plastique' is not available";
}
#else
Task::getTaskInterface()->app->setStyle(new QPlastiqueStyle);
Task::getTaskInterface()->app->setStyle(new QPlastiqueStyle);
#endif
}
}

setlocale(LC_ALL,"C");
@@ -224,7 +229,10 @@ void* Task::startTaskFunc(void* argument)
mars->simulatorInterface->getControlCenter()->cfg->setPropertyValue("Simulator", "realtime calc", "value", marsArguments->realtime_calc);
}

mars->marsGraphics = libManager->getLibraryAs<mars::interfaces::GraphicsManagerInterface>("mars_graphics");
if (enable_gui)
{
mars->marsGraphics = libManager->getLibraryAs<mars::interfaces::GraphicsManagerInterface>("mars_graphics");
}

// Synchronize with configureHook
marsArguments->initialized = true;
@@ -233,7 +241,10 @@ void* Task::startTaskFunc(void* argument)

libManager->releaseLibrary("mars_sim");
libManager->releaseLibrary("cfg_manager");
libManager->releaseLibrary("mars_graphics");
if (enable_gui)
{
libManager->releaseLibrary("mars_graphics");
}

delete simulation;
//Do not delete the QApplication it does not like it to be restarted
@@ -263,18 +274,15 @@ int Task::getOptionCount(const std::vector<Option>& options)

bool Task::setShow_coordinate_system(bool value)
{
//TODO Add your code here
if(!marsGraphics){
LOG_ERROR("Could not change view of coordinate systems without an Graphics interface\n");
return false;
}

//Call the base function, DO-NOT Remove
if(value)
marsGraphics->hideCoords();
else
{
//TODO Add your code here
if(!marsGraphics){
LOG_ERROR("Could not change view of coordinate systems without an Graphics interface\n");
return false;
}
marsGraphics->showCoords();

}
return(mars::TaskBase::setShow_coordinate_system(value));
}