Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
a394dd5b
Commit
a394dd5b
authored
9 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Patches
Plain Diff
Add gazebo, gazebo_iris and gazebo_vtol targets
parent
bdcddd78
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
Tools/sitl_run.sh
+16
-7
16 additions, 7 deletions
Tools/sitl_run.sh
src/firmware/posix/CMakeLists.txt
+25
-15
25 additions, 15 deletions
src/firmware/posix/CMakeLists.txt
with
42 additions
and
23 deletions
Makefile
+
1
−
1
View file @
a394dd5b
...
...
@@ -184,7 +184,7 @@ clean:
# targets handled by cmake
cmake_targets
=
test
upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak
\
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim
\
jmavsim_gdb jmavsim_lldb
jmavsim_gdb jmavsim_lldb
gazebo_gdb_iris gazebo_lldb_vtol gazebo_iris gazebo_vtol
$(
foreach
targ,
$(
cmake_targets
)
,
$(
eval
$(
call cmake-targ,
$(
targ
))))
.PHONY
:
clean
...
...
This diff is collapsed.
Click to expand it.
Tools/sitl_run.sh
+
16
−
7
View file @
a394dd5b
...
...
@@ -3,18 +3,27 @@
rc_script
=
$1
debugger
=
$2
program
=
$3
build_path
=
$4
model
=
$4
build_path
=
$5
curr_dir
=
`
pwd
`
echo
SITL ARGS
echo
rc_script:
$rc_script
echo
debugger:
$debugger
echo
program:
$program
echo
model:
$model
echo
build_path:
$build_path
if
[
"$
#
"
!
=
4
]
if
[
"
$
model
"
==
""
]
||
[
"
$model
"
=
=
"none"
]
then
echo
usage: sitl_run.sh rc_script debugger program build_path
echo
"empty model, setting iris as default"
model
=
"iris"
fi
if
[
"$#"
!=
5
]
then
echo
usage: sitl_run.sh rc_script debugger program model build_path
echo
""
exit
1
fi
...
...
@@ -54,9 +63,9 @@ then
cd
Tools/sitl_gazebo/Build
cmake ..
make
-j4
gzserver ../worlds/
iris
.world &
gzserver ../worlds/
${
model
}
.world &
SIM_PID
=
`
echo
$!
`
gzclient&
gzclient
&
GUI_PID
=
`
echo
$!
`
else
echo
"You need to have gazebo simulator installed!"
...
...
@@ -78,10 +87,10 @@ else
./mainapp ../../../../
${
rc_script
}
_
${
program
}
fi
if
[
"
$
3
"
==
"jmavsim"
]
if
[
"
$
program
"
==
"jmavsim"
]
then
kill
-9
$SIM_PID
elif
[
"
$
3
"
==
"gazebo"
]
elif
[
"
$
program
"
==
"gazebo"
]
then
kill
-9
$SIM_PID
kill
-9
$GUI_PID
...
...
This diff is collapsed.
Click to expand it.
src/firmware/posix/CMakeLists.txt
+
25
−
15
View file @
a394dd5b
...
...
@@ -26,27 +26,37 @@ endif()
add_custom_target
(
run_config
COMMAND Tools/sitl_run.sh
"
${
config_sitl_rcS
}
"
"
${
config_sitl_debugger
}
"
"
${
config_sitl_viewer
}
"
"
${
CMAKE_BINARY_DIR
}
"
"
${
config_sitl_viewer
}
"
"
${
config_sitl_model
}
"
"
${
CMAKE_BINARY_DIR
}
"
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
USES_TERMINAL
)
add_dependencies
(
run_config mainapp
)
foreach
(
viewer jmavsim gazebo
)
foreach
(
viewer
none
jmavsim gazebo
)
foreach
(
debugger none gdb lldb
)
if
(
debugger STREQUAL
"none"
)
set
(
_targ_name
"
${
viewer
}
"
)
else
()
set
(
_targ_name
"
${
viewer
}
_
${
debugger
}
"
)
endif
()
add_custom_target
(
${
_targ_name
}
COMMAND Tools/sitl_run.sh
"
${
config_sitl_rcS
}
"
"
${
debugger
}
"
"
${
viewer
}
"
"
${
CMAKE_BINARY_DIR
}
"
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
USES_TERMINAL
)
add_dependencies
(
${
_targ_name
}
mainapp
)
foreach
(
model none iris vtol
)
if
(
debugger STREQUAL
"none"
)
if
(
model STREQUAL
"none"
)
set
(
_targ_name
"
${
viewer
}
"
)
else
()
set
(
_targ_name
"
${
viewer
}
_
${
model
}
"
)
endif
()
else
()
if
(
model STREQUAL
"none"
)
set
(
_targ_name
"
${
viewer
}
___
${
debugger
}
"
)
else
()
set
(
_targ_name
"
${
viewer
}
_
${
model
}
_
${
debugger
}
"
)
endif
()
endif
()
add_custom_target
(
${
_targ_name
}
COMMAND Tools/sitl_run.sh
"
${
config_sitl_rcS
}
"
"
${
debugger
}
"
"
${
viewer
}
"
"
${
model
}
"
"
${
CMAKE_BINARY_DIR
}
"
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
USES_TERMINAL
)
add_dependencies
(
${
_targ_name
}
mainapp
)
endforeach
()
endforeach
()
endforeach
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment