Git Product home page Git Product logo

cyphal_communicator's Introduction

Cyphal communicator

Cyphal communicator converts Cyphal messages to ROS and vice versa.

It covers a minimal set of sensors required for such applications as Ardupilot/PX4 Cyphal HITL simulation. This communicator can be used for other purposes as well.

Content

1. Conversions

The tables below represent the supported conversions:

CYPHAL->ROS

โ„– ROS msg ROS topic Cyphal msg Cyphal subject name
1 sensor_msgs/Joy /uav/actuators_raw reg.udral.service.actuator.common.sp.Scalar_0_1 setpoint
2 std_msgs::Bool /uav/arm reg.udral.service.common.Readiness_0_1 readiness

ROS->CYPHAL

โ„– ROS msg ROS topic Cyphal msg Cyphal subject name
1 sensor_msgs/Imu /uav/imu uavcan.si.sample.angular_velocity.Vector3.1.0 gyro
uavcan.si.sample.acceleration.Vector3.1.0 accel
2 sensor_msgs/MagneticField /uav/mag uavcan.si.sample.magnetic_field_strength.Vector3.1.0 mag
3 std_msgs/Float32 /uav/static_temperature uavcan.si.sample.temperature.Scalar.1.0 baro_temperature
std_msgs/Float32 /uav/static_pressure uavcan.si.sample.pressure.Scalar.1.0 baro_pressure
4 std_msgs/Float32 /uav/yaw uavcan.si.sample.angle.Scalar.1.0 gps_yaw
sensor_msgs/NavSatFix /uav/gps_position reg.udral.physics.kinematics.geodetic.PointStateVarTs.0.1 gps_point
geometry_msgs/Twist /uav/velocity
Gps yaw is not implemented yet because the yaw angle might be estimated from velocity.
Satellites number and other fields are not implemented yet as well.

2. Preparation

Before running the communicator, you need to do 3 things:

  1. Compile DSDL. You can use compile_dsdl.sh as an example. You should compile it each time after updating DSDL.
  2. Create virtual CAN. It is expected that you are using CAN-sniffer device such as UAVCAN sniffer and programmer. An example of script that creates SLCAN is scripts/create_slcan_from_serial.sh. This script automatically detect a connected device and create slcan0 port. You should create virtual CAN once after each sniffer connection to your PC.
  3. Configure environment variables. This step is required for setting subjects port id and few pathes. As an example, you can run source scripts/config.sh. You should call this script in each shell session.

After these steps you are able to run the communicator.

3. Running

It is recommended to run the communicator using launch file as shown below:

roslaunch cyphal_communicator cyphal_communicator.launch

4. Usage example

Below you can see an example of using the cyphal_communicator in conjunction with a VTOL dynamics simulator.

vtol HITL dynamics simulator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.