0
$\begingroup$

Rosanswers logo

The ros2-controlles package has a DiffDriveController node that listens to the Twist messages on "~/cmd_vel"

I followed the bring up demo repo and created my own launch file, after removing the rviz related part.

When I listed the topics I saw that the cmd_vel took the namespace of the controller node as in:

/diff_drive_controller/cmd_vel

Another package that publishes to the "cmd_vel" topic is the telepop-joy which lets you publish to cmd_vel using a PS3/PS4 joytstick.

That node publishes to "/cmd_vel" in the global namespace.

One approach I had is to remap the namespace while launching the joystick node, which had some success, but there is some quirk where the joystick output is constant, i.e only a single value is given no matter how much I move the stick.

My full launch file is here

I am curious, what is the correct way to deal with this type of thing, where two packages work great on their own, but have different namespaces. There has to be a "ros" way for this I imagine.


Originally posted by sameh4 on ROS Answers with karma: 89 on 2021-07-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You are already doing it correctly. I am using remapping in large projects, and they work great. The issues you have is probably caused by something else and not remapping or controller.


Originally posted by destogl with karma: 877 on 2022-03-01

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.