Per current implementation, when constructing the service event JavaScript file, we suppose the subfolder of the service event is "srv", but some package, e.g., slam_toolbox, the .srv files are put under srvs/ folder, so when requiring the service event,
slam_toolboxsrvsAddSubmap_Event.js, it will imports the requst file, which is slam_toolboxsrvAddSubmap_Request.js, and lead to an error.
This patch passes the subfolder to the spec when creating the service event JS file, so it can require the request/response files by a correct file name.
Per current implementation, when constructing the service event JavaScript file, we suppose the subfolder of the service event is "srv", but some package, e.g., slam_toolbox, the .srv files are put under
srvs/
folder, so when requiring the service event, slam_toolboxsrvsAddSubmap_Event.js, it will imports the requst file, which is slam_toolboxsrvAddSubmap_Request.js, and lead to an error.This patch passes the subfolder to the spec when creating the service event JS file, so it can require the request/response files by a correct file name.
Fix: #955