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

Maila 24 add car mode to simulation #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<exec_depend>stage_ros2</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
43 changes: 43 additions & 0 deletions stage/models/traxxas_summit/car.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Stage simulator model of 'traxxas-summit'


# These relative path should be specified respect to the `main.world` file see:
# https://github.com/Mailamaca/stage/issues/1
include "../../sensors/ust10lx.ranger"
# include "../../sensors/simcam.camera"


define car position
(
# size
size [0.563 0.470 0.200]
origin [0.172828879 0 0 0]
gui_nose 1

bitmap "../../models/traxxas_summit/footprint.png"

# kinematic model
drive "diff"

# update frequency
update_interval 20

# type of localization
localization "gps"
# gps = absolute
# odom = relative

# [ xmin xmax ymin ymax zmin zmax amin amax ]
velocity_bounds [-1.5 1.5 0 0 0 0 -90 90]

# LiDAR
# position in metres, the centre of rotation offset must be added
# and initial position
ust10lx ( pose [ 0.0 0 0.25 0 ] size [ 0.05 0.05 0.035 ] )

# Camera
# temporary disabled so we can run simulation without GUI (and camera requires GUI)
# simcam ( pose [ -0.1375 0 0.175 0 ] size [ 0.025 0.09 0.025 ] )

stack_children 0
)
Binary file added stage/models/traxxas_summit/footprint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added stage/models/traxxas_summit/summit_top_view.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
165 changes: 0 additions & 165 deletions stage/models/tx2.model

This file was deleted.

5 changes: 3 additions & 2 deletions stage/sensors/ust10lx.ranger
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
define ust10lx ranger
(
sensor(
range [ 0.0 10.0 ]
fov 270.0
range [ 0.0 12.0 ]
fov 3600.0
samples 3243
)

# generic model properties
color "orange"
update_interval 100 # sensor frequency [ms]
)
4 changes: 2 additions & 2 deletions stage/worlds/simple_field/main.world
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A simple italian flag world.

include "../../models/tx2.model"
include "../../models/traxxas_summit/car.model"

define test_block model
(
Expand All @@ -9,7 +9,7 @@ define test_block model
)

# throw in a robot
tx2( pose [ 5 0 0 0 ] name "car" color "blue")
car( pose [ 5 0 0 0 ] name "car" color "blue")

# :it: flag test blocks, use them interactively to obstacolate the robot.
test_block
Expand Down
4 changes: 2 additions & 2 deletions stage/worlds/willow_garage/main.world
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@



include "../../models/tx2.model"
include "../../models/traxxas_summit/car.model"

define floorplan model
(
Expand Down Expand Up @@ -44,4 +44,4 @@ floorplan
)

# throw in a robot
tx2( pose [ -33 13 0 0 ] name "car" color "blue")
car( pose [ -33 13 0 0 ] name "car" color "blue")