Conversation
a2eb1f4 to
9bd9779
Compare
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
…o back to pytest.fail and trigger more often Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
… flow Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
30b8eeb to
8e4ff76
Compare
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
…cmd_vel_final to cause no confusion Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
…pute_path_to_pose would otherwise time out Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
| default_nav_to_pose_bt_xml: substitute_me | ||
| robot_base_frame: substitute_me | ||
| odom_topic: substitute_me | ||
| default_server_timeout: 10000 |
There was a problem hiding this comment.
By default, these are the timeouts in ms:
default_server_timeout: 20
default_cancel_timeout: 50
wait_for_service_timeout: 1000On github, this irregularly could cause the following error:
[panther.bt_navigator_navigate_to_pose_rclcpp_node]: Timed out while waiting for action server to acknowledge goal request for compute_path_to_poseWhich would then result in failing to navigate to the goal during the test.
Not sure whether the increase to 10s each is too extreme, but maybe we can also find a neat way to only use these increased values for the github CI?
There was a problem hiding this comment.
I don't see a direct problem of having a 10s timeout. If this appears to be a problem when using hardware, we can make a change to use different timeouts for hardware and simulation.
…meters Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
| executable="twist_mux", | ||
| name="twist_mux", | ||
| namespace=vehicle_config.namespace, | ||
| parameters=[ |
There was a problem hiding this comment.
Do we want these parameters to be moved to its own yaml file? And would that then be placed in alliander_description?
There was a problem hiding this comment.
For me it is fine to keep it like this for now. If we need to use the parameters add more places or change them often, we can start using a yaml file.
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
…_vel by default Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
| sleep_infinity = ExecuteProcess(cmd=["sleep", "infinity"]) | ||
|
|
||
| return [ | ||
| SetParameter(name="use_sim_time", value=vehicle_config.simulation), |
There was a problem hiding this comment.
Do we also need to add this to the controllers.launch.py file?
There was a problem hiding this comment.
I think the SetParameter sets the parameter for all nodes, also nodes defined in the sub launch files included. So it should not be necessary to add this to the controllers.launch.py.
…cstrings Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
| executable="twist_mux", | ||
| name="twist_mux", | ||
| namespace=vehicle_config.namespace, | ||
| parameters=[ |
There was a problem hiding this comment.
For me it is fine to keep it like this for now. If we need to use the parameters add more places or change them often, we can start using a yaml file.
| sleep_infinity = ExecuteProcess(cmd=["sleep", "infinity"]) | ||
|
|
||
| return [ | ||
| SetParameter(name="use_sim_time", value=vehicle_config.simulation), |
There was a problem hiding this comment.
I think the SetParameter sets the parameter for all nodes, also nodes defined in the sub launch files included. So it should not be necessary to add this to the controllers.launch.py.
| default_nav_to_pose_bt_xml: substitute_me | ||
| robot_base_frame: substitute_me | ||
| odom_topic: substitute_me | ||
| default_server_timeout: 10000 |
There was a problem hiding this comment.
I don't see a direct problem of having a 10s timeout. If this appears to be a problem when using hardware, we can make a change to use different timeouts for hardware and simulation.
| f"/{namespace_vehicle}/cmd_vel" | ||
| f"/{namespace_vehicle}/cmd_vel_nav" | ||
| if not nav2.collision_monitor | ||
| else f"/{namespace_vehicle}/cmd_vel_raw" |
There was a problem hiding this comment.
I like the naming of cmd_vel_nav and 'cmd_vel_joy. Only cmd_vel_raw` feels odd now. But I am not sure if another name would clarify it...
cmd_vel_raw is actually the input for the collision monitor, so we could call it something like cmd_vel_cm_in. But again, this name can also be vague, especially due to the abbreviation of cm for collision monitor. Any other thoughts?
There was a problem hiding this comment.
_raw is used more often in ROS context to indicate something that is fed into a different node for processing, so it feels okay to me. Could also use cmd_vel_in to indicate it will be used by another node
| vehicle_platform.nav2_config.navigation = True | ||
| test_class = type( | ||
| f"Test{vehicle.capitalize()}{lidar.capitalize()}Navigation", | ||
| f"Test{vehicle.capitalize()}{lidar.capitalize()}LidarNavigation", |
There was a problem hiding this comment.
Do we want this rename also for GPS? So Navgiation -> GPSNavigation
| LAUNCH_TIMEOUT = 90 # seconds | ||
| COMPOSE_FILE = "/alliander_robotics/compose_pytest.yml" | ||
| HOST_COMPOSE_FILE = "/alliander_robotics/compose.yml" | ||
| MAX_ROS_DOMAIN_ID = ( |
There was a problem hiding this comment.
Are all these additions still needed with the twist_mux fix? I guess it is also cleaner this way as we separate the environments more between tests. Are there any downsides to adding this, e.g. increased test time?
Bug fix of the navigation tests
Some hidden bugs had entered our code, and this PR has focused on solving these issues.
Original error: constant timeouts during the navigation tests. Examples of these tests:
An important change here was to use
assertinstead ofraise, both in terms of how araiseseems to crash all tests afterwards, as well as that araisein a pytest does not guarantee that no more code of the test itself will be executed (for example, theassertafter theraisewas still triggered, which was not the desired behaviour). Theseraisestatements are still all over the tests, it is better to start replacing these withassertstatements (then the test workflow will still continue with testing instead of stopping immediately).Additionally found error (see diff_drive_controller for origin error) in the gazebo container:
Command message contains NaNs. Not updating reference interfaces.This was solved using the twist_mux package as a filter between the
drive_controllerof the Husarion package, and thebehavior_server,controller_server, andcollision_monitorof the nav2 package. Apparently during startup in the Github CI, nav2 would send invalidcmd_velmessages to thedrive_controller, getting stuck in the NaN error. Adding thetwist_muxfilter fixed it.Incorrect time usage by gazebo: https://github.com/alliander-opensource/alliander-robotics/actions/runs/24189542218/job/70603291944?pr=420
Fixed by adding
use_sim_timeto the Husarion launch file.Additional improvements:
pub_topicremapping in thenav2.launch.pyfile.Testing
Explain how you tested your changes.
Documentation
Additional Notes
Any relevant screenshots, logs, or context.