Attention: Answers.ros.org is deprecated as of August the 11th, 2023. Please visit robotics.stackexchange.com to ask a new question. This site will remain online in read-only mode during the transition and into the foreseeable future. Selected questions and answers have been migrated, and redirects have been put in place to direct users to the corresponding questions on Robotics Stack Exchange. Additional details are available here.
hello,
I want to know that how can i force a predefined package to subscribe a particular topic, for an instance, i have a package named "executive_usarsim" by makokal which acts as an interface between usarsim and ROS and currently it is not subscribing to cmd_vel topic, i want this package to subscribe to "cmd_vel" topic.
Thank you.
I suppose you have no access to the code of the package "executive_usarsim". (in that case it would be really strightforward)
If you have no access then you could remap the output of a specific topic to your desired topic (/cmd_vel) in your launch file.
Here is an example which coudl be helpful to you. Your keyword shuld be "remap". Since the documentatin in ROS is not so good I suggest to look in existing codes in the Q&A.
Regards