ros2 launch stage_ros2 stage.launch.py
ros2 run mr_goto goto --ros-args -p mode:="plan" -p x:=-3.0 -p y:=-5.0 -p deg:=70.0 --remap scan:=base_scan
ros2 launch mr_goto goto.launch.py
ros2 launch mr_goto full.launch.py
ros2 service call /explored_area std_srvs/srv/Trigger
make build-ws02
restart terminal
Task | Points | Author |
---|---|---|
0. | 100% | All |
0.2 | 20 | All |
1.1 | 50 | Florian Wimmer |
1.2.1 | 25 | Simon Roth |
1.2.2 | 25 | Florian Wimmer |
1.3.1 | 25 | Simon Roth |
1.3.2 | 25 | Simon Roth |
5.1 | 20 | Florian Wimmer |
5.2 | 20 | Florian Wimmer |
5.3 | 20 | Florian Wimmer |
5.4 | 20 | Florian Wimmer |
6 | 50 | Rita Schrabauer, Florian Wimmer |
7.1 | 30 | Simon Roth |
7.2 | 20 | Simon Roth |
7.3 | 10 | Simon Roth |
Sum | 360 | All |
Authors | Points(%) |
---|---|
Simon Roth | 33.3 |
Rita Schrabauer | 33.3 |
Florian Wimmer | 33.3 |
Git was used during the project, the ropsitory can be found under the following link: https://github.com/srothh/mr_goto
The GoTo Task was implemented in a new Python Node.
To accomplish the simple goto exercise, the map was divided into grid cells of equal size. These cells all stored the cost (distance) to the cell containing the goal point. The robot navigation was executed with a simple greedy selection for the cell with the lowest distance of all the cells neighbouring the robots current position.
Used Command:
ros2 run mr_goto goto --ros-args -p mode:="plan" -p x:=-3.0 -p y:=-5.0 -p deg:=70.0 --remap scan:=base_scan
Robot driving towards goal with just simple navigation:
Result with pose:
Used Command: In order to accomplish this, the greedy selection from the last exercise was enhanced. The robot is discouraged from moving to close or turning towards obstacles, while it is encouraged to keep driving straight when near an obstacle. While this does not guarantee a shortest/optimal path, it works rather well.
ros2 run mr_goto goto --ros-args -p mode:="plan" -p x:=1.0 -p y:=-5.0 -p deg:=70.0 --remap scan:=base_scan
Result:
The cave uses the same algorithm as the 1.3.1 assignment.
Used Command:
ros2 run mr_goto goto --ros-args -p mode:="plan" -p x:=-4.0 -p y:=1.0 -p deg:=70.0 --remap scan:=base_scan
Result:
A simple launch file which is calling all the nodes.
ros2 launch mr_goto full.launch.py
To make EKF and PF or goto and move optional you first have to define the DeclareLaunchArguments localization and planner. Afterwards these LaunchArguments can be used in a opaque function to choose between the nodes.
localization:=ekf\
planner:=goto
The parameter for the launch files is declared via DeclareLaunchArgument.
world:=cave\
parameter_goto:=goto\
parameter_pf:=particle_filter.yaml
The relative Paths for the Parameter files is already called like in 5.3. The implementation is done via opaque functions where the relative path is altered to an absolute path.
The needed commands for installing the sros2 package are:
sudo apt update
sudo apt install libssl-dev
colcon build --symlink-install --cmake-args -DSECURITY=ON
Then the keystore has to be generated:
ros2 security create_keystore <keystore name>
In this project the keystore is in the sros2 directory and called keystore.
The keys and certificates are created for each node.
ros2 security create_enclave <keystore name> <node name>
For the nodes to use the encryption the param --enclave <node name>
is needed. Also three environment variables need to be set:
export ROS_SECURITY_KEYSTORE=<keystore name>
export ROS_SECURITY_ENABLE=true
export ROS_SECURITY_STRATEGY=Enforce
For this env_vars.sh has to be sourced.
The security message can be checked via:
sudo tcpdump -X -i any udp port 7400
A node that is launched by a python launch file can include security by calling a xml launch file inside the python launch file. The xml launch file includes:
<launch>
<group>
<node pkg="package_name" exec="exec_name" args="--ros-args --enclave /node_name"/>
</group>
</launch>
The python file needs following snippet inside the launch description:
IncludeLaunchDescription(
XMLLaunchDescriptionSource([xml_launch_file])
)
An example can be found in the directory xml_example.
Every cell the robot passes through for the first time has it's area in square meters added to the total explored area, which is printed to the console every cycle.
Result:
The service is implemented in the goto.py file. The command to check it is:
ros2 service call /explored_area std_srvs/srv/Trigger
Result:
The explored are is published on the explored topic. Checking this topic while the robot is running gives the current explored area: