dwaComputeVelocityCommands vs computeVelocityCommands
I'm trying to use dwalocalplanner standalone, to do so I'm following this answer.
In the answer linked above computeVelocityCommands
is used, however, after looking at the documentation of dwalocalplanner, it seems more appropriate to use dwaComputeVelocityCommands
.
However, if using dwaComputeVelocityCommands
the node crashes abruptly.
How I use dwaComputeVelocityCommands
in my node:
if (dp.dwaComputeVelocityCommands(dwa_cmd_vel)) {
ROS_INFO("DWA compute cmd_vel: SUCCESS");
} else {
ROS_ERROR("DWA compute cmd_vel: FAILED");
}
and the error (the indicated log files do not exist):
[demo-4] process has died [pid 5918, exit code -11, cmd /my_path/devel/lib/dwa_demo/demo __name:=demo __log:=/home/user/.ros/log/56f74032-c9eb-11ec-8485-b0c0909328b9/demo-4.log].
log file: /home/user/.ros/log/56f74032-c9eb-11ec-8485-b0c0909328b9/demo-4*.log
On the other hand, if computeVelocityCommands
is used (by changing the condition of the if
above) the node does not crash and keeps executing and printing
DWA compute cmd_vel: SUCCESS
Now, the weird thing is that inside computeVelocityCommands
there is a call to dwaComputeVelocityCommands
at line 302 and it seems that the call is actually executed correctly.
However, it may be that dwaComputeVelocityCommands
is not called inside computeVelocityCommands
and the true
value of computeVelocityCommands
(that makes the program access the if
branch) is returned by line 293.
Do you have any suggestions about why using dwaComputeVelocityCommands
makes the node crash while using computeVelocityCommands
does not?
Asked by 0novanta on 2022-05-02 03:03:30 UTC
Comments