Skip to content

Commit

Permalink
Restructured ardupilot_ros
Browse files Browse the repository at this point in the history
  • Loading branch information
snktshrma committed Jan 8, 2025
1 parent 5c7086e commit 9bff9d3
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions README.md → cartographer_ap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Build it with colcon build:
```bash
cd ~/ros2_ws
source /opt/ros/humble/setup.bash
colcon build --packages-up-to ardupilot_ros ardupilot_gz_bringup
colcon build --packages-up-to cartographer_ap ardupilot_gz_bringup

```

Expand All @@ -60,7 +60,7 @@ In another terminal, with the world and copter in place, launch cartographer to
```bash
cd ~/ros2_ws
source install/setup.bash
ros2 launch ardupilot_ros cartographer.launch.py
ros2 launch cartographer_ap cartographer.launch.py
```

If you'd like to get the information from Cartographer to go into Ardupilot's extended kalman filter, you will need to change some parameters. You can do that through any GCS, including mavproxy:
Expand All @@ -87,12 +87,12 @@ The joystick controller allows you to control ArduPilot through a ROS joy topic.
```bash
cd ~/ros2_ws
source install/setup.bash
ros2 run ardupilot_ros joy_controller
ros2 run cartographer_ap joy_controller
```

Then run the controller using,

`ros2 run ardupilot_ros joy_controller`
`ros2 run cartographer_ap joy_controller`

Now, using the keyboard keys you can control the drone.

Expand All @@ -112,15 +112,15 @@ Launch cartographer:
```bash
cd ~/ros2_ws
source install/setup.sh
ros2 launch ardupilot_ros cartographer.launch.py rviz:=false
ros2 launch cartographer_ap cartographer.launch.py rviz:=false
```

Launch nav2:

```bash
cd ~/ros2_ws
source install/setup.sh
ros2 launch ardupilot_ros navigation.launch.py
ros2 launch cartographer_ap navigation.launch.py
```

Takeoff the Copter using `mavproxy` to an altitude of 2.5m:
Expand Down
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
Expand Up @@ -23,7 +23,7 @@ def generate_launch_description():
parameters=[{"use_sim_time": LaunchConfiguration("use_sim_time")}],
arguments=[
"-configuration_directory",
FindPackageShare("ardupilot_ros").find("ardupilot_ros") + "/config",
FindPackageShare("cartographer_ap").find("cartographer_ap") + "/config",
"-configuration_basename",
"cartographer.lua",
],
Expand Down Expand Up @@ -64,7 +64,7 @@ def generate_launch_description():
"-d",
str(
Path(
FindPackageShare("ardupilot_ros").find("ardupilot_ros"),
FindPackageShare("cartographer_ap").find("cartographer_ap"),
"rviz",
"cartographer.rviz",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def generate_launch_description():
),
launch_arguments={
"use_sim_time": "true",
"params_file": FindPackageShare("ardupilot_ros").find(
"ardupilot_ros"
"params_file": FindPackageShare("cartographer_ap").find(
"cartographer_ap"
)
+ "/config"
+ "/navigation.yaml",
Expand Down Expand Up @@ -76,7 +76,7 @@ def generate_launch_description():
"-d",
str(
Path(
FindPackageShare("ardupilot_ros").find("ardupilot_ros"),
FindPackageShare("cartographer_ap").find("cartographer_ap"),
"rviz",
"navigation.rviz",
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion package.xml → cartographer_ap/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ardupilot_ros</name>
<name>cartographer_ap</name>
<version>0.0.0</version>
<description>The ardupilot ROS 2 use cases package</description>
<maintainer email="pedrofuoco6@gmail.com">Pedro Fuoco</maintainer>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py → cartographer_ap/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from glob import glob
from setuptools import setup

package_name = "ardupilot_ros"
package_name = "cartographer_ap"

setup(
name=package_name,
Expand Down Expand Up @@ -36,6 +36,6 @@
license="GPLv3+",
tests_require=["pytest"],
entry_points={
"console_scripts": ["joy_controller=ardupilot_ros.joy_controller:main"],
"console_scripts": ["joy_controller=cartographer_ap.joy_controller:main"],
},
)

0 comments on commit 9bff9d3

Please sign in to comment.