iRobotEducation / create3_examples

Example nodes to drive the iRobot® Create® 3 Educational Robot
BSD 3-Clause "New" or "Revised" License
51 stars 14 forks source link

create3_teleop does not work when overriding ROS2 namespace #60

Closed mcvlad closed 4 hours ago

mcvlad commented 5 hours ago

Hello,

Everything works fine if I don't override the namespace in App Config. However when overriding the create3 namespace, the create3_teleop stops working when launched like: ros2 launch create3_teleop teleop_joystick_launch.py namespace:=/robot_base

I've tried adding a namespace launch configuration and passing it to the nodes here: https://github.com/mcvlad/create3_examples/commit/9fe2cb2548dbb26c2b8d15a739515acd71eb868e#diff-75a203173afe2ebcf63e3c5af7df1c3ff2fe40a800b61c3281f43d1c370fc569R67

Now I see /robot_base/cmd_vel and /robot_base/joy topics, but the robot only moves forward when pressing the Turbo on button 5.. The joystick steering/throttle control is not responsive.

So something is getting through, but I'm unsure what's missing. Do you have any further ideas? Peaking at the topics, the joy commands are correct, but the /robot_base/cmd_vel is only set to a constant linear and angular velocity when button 5 is pressed:

---
linear:
  x: 0.4999999701976776
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 0.4999999701976776

Thanks, Mike

mcvlad commented 4 hours ago

Happy to say I got it working by remapping topics instead of overriding the node namespace:

                    remappings=[
                        ('joy', '/robot_base/joy'),
                        ('cmd_vel', '/robot_base/cmd_vel'),
                        ('joy/set_feedback', '/robot_base/joy/set_feedback')
                    ],