You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Types for creating an Action Client not Updating with Sources Action Message Types #688
// Variable actionType has to be a certain string value. Types don't update when sourcing additional packagesconstnewActionClient=newActionClient(node,actionTypeasActionTypeClassName,actionName);newActionClient.sendGoal(data).then(v=>{log.debug('Action Complete!');})
Right now the message types are only generated during postinstall or at runtime when calling init(). I can see how this would be a problem with TypeScript since you need to be able to compile everything before init() can be run again. We'll either need to make the action types more flexible or find better ways to update the generated message typings when additional packages are sourced.
For now, you can workaround this issue by manually regenerating the message typings using the following command. This should at least unblock you until there's a proper solution.
We once planed to implement that the message generator could generate the JS messages from IDL dynamically if the required message cannot be found, but can be found through PATH (the new package will be added after you source the xxx_install.sh).
Unfortunately, you have to manually delete the generated\ folder in order to trigger to generate the messages completely again, or workaround as @mattrichard said. Thanks!
For now, you can workaround this issue by manually regenerating the message typings using the following command. This should at least unblock you until there's a proper solution.
Update - Even after deleting generated and even the entire folder and reinstalling, I'm still not getting all my packages sourced. For example, when calling a the service /save_maps from Slamtoolbox, I'm getting the error The message required does not exist: slam_toolbox, srv, SaveMap. In the same terminal window, I can run that service from the command line.
This is from the CLI:
➜ ros2 service type /save_map
slam_toolbox/srv/SaveMap
I'm able to isolate the problem to the slam_toolbox does not follow the ROS naming convention for placing services interfaces (idl) in a folder named srv. Instead slam_toolbox services idl lives in a folder named srvshere.
I'll submit a PR that is a bit more robust handling of such situations.
A short term workaround is to manually change 1 line of code in node_modules/rclnodejs/rclgen_tsd/index.js line as shown below.
Activity
mattrichard commentedon Jul 31, 2020
Right now the message types are only generated during postinstall or at runtime when calling
init(). I can see how this would be a problem with TypeScript since you need to be able to compile everything beforeinit()can be run again. We'll either need to make the action types more flexible or find better ways to update the generated message typings when additional packages are sourced.For now, you can workaround this issue by manually regenerating the message typings using the following command. This should at least unblock you until there's a proper solution.
minggangw commentedon Jul 31, 2020
We once planed to implement that the message generator could generate the JS messages from IDL dynamically if the required message cannot be found, but can be found through
PATH(the new package will be added after you source thexxx_install.sh).Unfortunately, you have to manually delete the
generated\folder in order to trigger to generate the messages completely again, or workaround as @mattrichard said. Thanks!caelinsutch commentedon Aug 1, 2020
I got this error:
caelinsutch commentedon Aug 1, 2020
Update - Even after deleting
generatedand even the entire folder and reinstalling, I'm still not getting all my packages sourced. For example, when calling a the service/save_mapsfrom Slamtoolbox, I'm getting the errorThe message required does not exist: slam_toolbox, srv, SaveMap. In the same terminal window, I can run that service from the command line.This is from the CLI:
wayneparrott commentedon Aug 3, 2020
I'm able to isolate the problem to the slam_toolbox does not follow the ROS naming convention for placing services interfaces (idl) in a folder named
srv. Instead slam_toolbox services idl lives in a folder namedsrvshere.I'll submit a PR that is a bit more robust handling of such situations.
A short term workaround is to manually change 1 line of code in

node_modules/rclnodejs/rclgen_tsd/index.jsline as shown below.Improve tsd generation resilency.
Improve tsd generation resilency.
Write generated/generator.json only after message generation completes (