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

Rover: add rover example #33

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Conversation

srmainwaring
Copy link
Collaborator

@srmainwaring srmainwaring commented Oct 6, 2023

Add launch files and configuration for a skid steer rover.

  • Rover is a skid-steer Wild Thumper.
  • Use playpen world containing various obstacles.
  • Requires model repository SITL_Models enabled as a colcon package called ardupilot_sitl_models.

Dependencies

See also

Build

# clone additional dependency
$ cd ros2_ws/src
$ git clone https://github.com/ArduPilot/SITL_Models.git

# build
$ cd ros2_ws/src
$ colcon build --packages-up-to ardupilot_gz_bringup

Usage

$ ros2 launch ardupilot_gz_bringup wildthumper_playpen.launch.py rviz:=true use_gz_tf:=true

Figure: rover in playpen world
rover-gz

Figure: rover model, TF and odometry in rviz
rover-rviz

Tasks

  • Apply a filter to the TF tree passed to ArduPilot on /tf/ - the error below results from the TF message being too large.
  • Or: reintroduce the namespace on the ArduPilot TF topic (revert to /ap/tf).
[micro_ros_agent-3] 2023-10-06 19:14:53.766 [RTPS_READER_HISTORY Error] Change payload size of '1660' bytes is larger than the history payload size of '1031' bytes and cannot be resized. -> Function can_change_be_added_nts

Follow up

Figure: cartographer and navigation for the rover.
rover-rviz-nav

rover-nav2-clip.mov

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Oct 23, 2023

Any chance you could update the README with a note that rover is supported and the command to run?

@srmainwaring
Copy link
Collaborator Author

Any chance you could update the README with a note that rover is supported and the command to run?

Updated in 3cc183e. Update other examples with additional args needed to resolve odom frame in rviz.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Oct 25, 2023

No luck yet, still missing some data:

colcon build --packages-up-to ardupilot_gz_bringup
. install/setup.bash
ryan@B650-970:~/Dev/ros2_ws$ ros2 launch ardupilot_gz_bringup wildthumper_playpen.launch.py rviz:=true use_gz_tf:=true
file 'wildthumper_playpen.launch.py' was not found in the share directory of package 'ardupilot_gz_bringup' which is at '/home/ryan/Dev/ros2_ws/install/ardupilot_gz_bringup/share/ardupilot_gz_bringup'

@srmainwaring
Copy link
Collaborator Author

srmainwaring commented Oct 26, 2023

Hmm. that looks odd. wildthumper_playpen.launch.py is definitely in the launch directory, and cmake should install the entire folder to share. Are the other launch files there?

I can't replicate this issue after removing ./install/ardupilot_gz_bringup then rebuilding using the same colcon command?

Can replicate the message if I delete the launch file from ./install/ardupilot_gz_bringup/share/ardupilot_gz_bringup/launch after building, but its definitely installed in my case.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Oct 26, 2023

After some iteration, it works.
image

Once launched, start mavproxy and you can make it move.

mavproxy.py --master udp:127.0.0.1:14550  --console --moddebug 3
mode manual
arm throttle
rc 3 1600
status servo*

Signed-off-by: Rhys Mainwaring <[email protected]>

Rover: update package dependencies

Signed-off-by: Rhys Mainwaring <[email protected]>

Rover: fix ros_gz config and update rviz config

Signed-off-by: Rhys Mainwaring <[email protected]>

Rover: replace model:// with package:// in wildthumper launch file

Signed-off-by: Rhys Mainwaring <[email protected]>

Rover: correct comment in launch file

Co-authored-by: Ryan <[email protected]>

Rover: add missing dependency to ros_gz_bridge

Signed-off-by: Ryan Friedman <[email protected]>

Rover: remove debug print

Signed-off-by: Rhys Mainwaring <[email protected]>

Rover: add rover example to README

Signed-off-by: Rhys Mainwaring <[email protected]>

Rover: add dependency on sdformat_urdf

Signed-off-by: Rhys Mainwaring <[email protected]>
@Ryanf55 Ryanf55 merged commit 6ecc691 into ArduPilot:main Oct 26, 2023
@srmainwaring srmainwaring deleted the prs/pr-rover branch October 26, 2023 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants