Skip to content

How to properly send twist message from non-ros to ros #76

Closed
@leets0429

Description

@leets0429

I have a webapp (non-ros) sending twist message to the broker. Here is how I define the twist message in js

let twist = {
    linear: {
        x: 0.0,
        y: 0.0,
        z: 0.0
    },
    angular: {
        x: 0.0,
        y: 0.0,
        z: 0.0
    }
}

Here is my mqtt_client param

bridge:
  mqtt2ros:
    - mqtt_topic: cmd_vel
      ros_topic: /cmd_vel

The topic is converted into geometry_msgs/Twist, however I received weird value even though I'm sending twist with no speed. This is the value I receive using rostopic echo

---
linear: 
  x: 9.279857549485897e+242
  y: 2.2570320461507035e-76
  z: 4.5148394577894216e-144
angular: 
  x: 7.98459892965631e+159
  y: 1.164156688845003e-28
  z: 4.514839457752175e-144
---

I'm running ROS Noetic of Ubuntu 20.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions