add drone cat-mouse chase exercise (world + launcher + city model)#742
add drone cat-mouse chase exercise (world + launcher + city model)#742anishk85 wants to merge 2 commits into
Conversation
javizqh
left a comment
There was a problem hiding this comment.
Launcher must be named after the universe, for example: drone_cat_mouse.launch.py, not gazebo.launch.py.
It must be inside the Launchers folder not inside a subfolder.
World name must be default. Please read documentation before submitting a PR.
This has not been tested inside the RADI as it is missing the Cmake changes to compile the model.
Also missing database entry.
Hi @javizqh, Thanks for the feedback. We're still in the early stages of development, so these were mainly initial pushes. Pedro wanted to take a look at some configs, so I bundled the required assets in the RI repo for the time being. The actual integration work will start in the coming weeks, and I'll be restructuring things as part of that process. Don't worry—I’ll make sure everything ends up in the appropriate place. I'm familiar with the repository layout and will keep it aligned with the project's conventions. Appreciate the review! |
|
If this is not ready for review, please open a draft instead of a PR next time |
There was a problem hiding this comment.
I suggest to follow the structure of other drone exercise launchers which include two launch descriptions: gz_sim.launch.py and as2_default_gazebo_sim.launch.py.
We will need to include one gz_sim.launch.py for spawning Gazebo and two as2_default_gazebo_sim.launch.py, one for each drone.
There was a problem hiding this comment.
Not exactly true. After taking a look at gz_sim.aunch.py I notice that it also launches gz-drone bridges. We need to this twice. Is it worth splitting it into two launcher (one for gz and one for the launchers)? Or to adapt current launcher to make it work with n drones?
| # takeoff behaviour | ||
| Node( | ||
| package='as2_behaviors_motion', | ||
| executable='takeoff_behavior_node', | ||
| namespace=drone, | ||
| output='screen', | ||
| parameters=[ | ||
| {'use_sim_time': True}, | ||
| {'plugin_name': 'takeoff_plugin_speed'}, | ||
| {'takeoff_height': 3.0}, | ||
| {'takeoff_speed': 1.5}, | ||
| {'takeoff_threshold': 0.2}, | ||
| {'tf_timeout_threshold': 0.1}, | ||
| ], | ||
| ), | ||
|
|
||
| # land behaviour | ||
| Node( | ||
| package='as2_behaviors_motion', | ||
| executable='land_behavior_node', | ||
| namespace=drone, | ||
| output='screen', | ||
| parameters=[ | ||
| {'use_sim_time': True}, | ||
| {'plugin_name': 'land_plugin_speed'}, | ||
| {'land_speed': 0.5}, | ||
| {'land_speed_condition_percentage': 0.2}, | ||
| {'land_condition_height': 0.2}, | ||
| {'land_height': -10.0}, | ||
| {'land_position_condition_time': 1.0}, | ||
| {'tf_timeout_threshold': 0.1}, | ||
| ], | ||
| ), | ||
|
|
||
| # go-to — used for initial positioning | ||
| Node( | ||
| package='as2_behaviors_motion', | ||
| executable='go_to_behavior_node', | ||
| namespace=drone, | ||
| output='screen', | ||
| parameters=[ | ||
| {'use_sim_time': True}, | ||
| {'plugin_name': 'go_to_plugin_position'}, | ||
| {'go_to_speed': 2.0}, | ||
| {'go_to_threshold': 0.3}, | ||
| {'tf_timeout_threshold': 0.1}, | ||
| ], | ||
| ), | ||
|
|
||
| # follow-reference — the cat uses this to chase the mouse | ||
| Node( | ||
| package='as2_behaviors_motion', | ||
| executable='follow_reference_behavior_node', | ||
| namespace=drone, | ||
| output='screen', | ||
| parameters=[ | ||
| {'use_sim_time': True}, | ||
| {'plugin_name': 'follow_reference_plugin_position'}, | ||
| {'follow_reference_max_speed_x': 3.0}, | ||
| {'follow_reference_max_speed_y': 3.0}, | ||
| {'follow_reference_max_speed_z': 1.5}, | ||
| {'tf_timeout_threshold': 0.1}, | ||
| ], | ||
| ), | ||
| ]) |
There was a problem hiding this comment.
Not needed. Behaviors might be a bit demanding, so we decided to not to use them.
There was a problem hiding this comment.
not needed, already at jderobot_drones package
There was a problem hiding this comment.
not needed, already at jderobot_drones package
There was a problem hiding this comment.
not needed, already at jderobot_drones package
There was a problem hiding this comment.
not needed, already at jderobot_drones package
There was a problem hiding this comment.
Spawning a model using Gz services gives an exception when resetting the world, causing the models to disappear. We manually include the sdf in the world file
There was a problem hiding this comment.
Nevermind, they are already included in the world file. Then, this file is not needed.
| </include> | ||
|
|
||
| <!-- drone_cat — the one the student controls --> | ||
| <include> |
There was a problem hiding this comment.
I suggest to create a custom model at jderobot_drones package and to include it from there. World file would be much cleaner.
|
Hi, I just wanted to mention that these files have only been arranged inside the RI repository for now so that the assets are available and visible. I haven't integrated them or split them into their final structure yet, but I will do that once I start the integration work. Currently, the files mainly reflect my local code setup that has been moved into the RI repository. I plan to start the actual integration next week, and I'll commit additional changes as the integration effort progresses. |
adds the gazebo world, launcher, and custom city model for the drone cat-mouse chase exercise. two quadrotor drones (drone_cat and drone_mouse) spawn in a blender-exported city
files are split across the three standard RI directories following the same pattern as pick_place: world SDF goes in Worlds/, the city GLB model goes in CustomRobots/drone_cat_mouse/models/, and the launch file + AS2 config YAMLs go in Launchers/drone_cat_mouse/. the launch file brings up gazebo harmonic, ros-gz bridges for both drones (cmd_vel, imu, camera), and the full aerostack2 stack per drone (platform, state estimator, motion controller, takeoff/land/goto/follow behaviours).
the city mesh is about 7MB — kept it low poly on purpose (~65K faces) so it dosnt kill gazebo on weaker machines. the quadrotor_base model is already in AS2 so its not duplicated here. keep thsi much add here as aerostack 2 is already installed in the radi image we will config it with it right now thsi is just an external setup moving foeward in upcoming weeks for further integartion
initial_setup.webm