Giter VIP home page Giter VIP logo

roscfe's Introduction

RACS (ROS1 and cFS System) project

This repository is a collection of libraries and tools which enable to implement Robot Operating System (ROS1) nodes into core Flight Executives (cFE). cFE is a core component of NASA-supplied spacecraft software, Core Flight System (CFS).

This project provides the following 3 components,

  • CFS converter
  • ROS/cFE interface library
  • ROS/cFE network bridge

Since there are many combinations of ROS and cFE versions, we do not currently support all versions including the latest version. If you have any requests for updates, please contact us. We will respond on demand.

License

This project is under the Apache 2.0 license. See LICENSE.txt.

Release Notes

  • RACS (ROScFE) project suite 1.0.0 is released.

Directory List

  • cfs_converter:
    The Convertor that translates ROS nodes into CFS apps.
  • convert_lib:
    The library that is built with converted ROS nodes in CFS. This library provides the fundamental functions required from converted ROS nodes.
  • sample_pub:
    Sample ROS publisher node used for conversion test.
  • sample_sub:
    Sample ROS subscriber node used for conversion test.
  • hk_pub:
    Sample ROS publisher node communicating with HK app.
  • hk_sub:
    Sample ROS subscriber node communicating with HK app.

Dependency

Setup on Linux

  • Prerequisite: ROS kinetic is installed.

  • Clone this repository.

    cd [your working directory]  
    git clone [repository URL]
    
  • Get cFE and OSAL source and extract them on your working directory.

    tar -zxf cFE-6.5.0-OSS-release.tar.gz -C [your working directory]
    tar -zxf osal-4.2.1a-release.tar.gz -C [your working directory]
    
  • Move extracted OSAL directory into the cFE directory as "osal" directory.

    cd [your working directory]  
    cp -pr osal-4.2.1a-release/* cFE-6.5.0-OSS-release/osal/
    
  • Change directory to cfs_converter/.

    cd roscfe/cfs_converter
    
  • Edit "config.ini" according to your environment.
    [optional] Set "create_relay_flag" to 1 if ROS/cFE network bridge is used.

    ...  
    cfe_path=[your working directory]/cFE-6.5.0-OSS-release/apps  
    ...  
    ros_path=[your catkin workspace]/src  
    ...  
    create_relay_flag=1     ; =1 : when ROS/cFE network bridge is used  
    ...  
    
  • Add your ROS package path, launch file name, and ROS node name activated from launch file into "convert_list.txt".
    Ex) If your ROS workspace is as follows,

    catkin_ws  
        └─src  
           └─my_ros_package  
              ├─launch  
              |   └─bringup.launch  
              └─src  
              |   └─XXX.cpp  
              └─include  
                  └─YYY.h  
    

    then edit "convert_list.txt" as follows.

    # [ros_pkg path] [launch file name] [name of launch node(*)]  
    /home/test_user/catkin_ws/src/my_ros_package bringup.launch my_node   
    
    # OR  
    /home/test_user/catkin_ws/src/my_ros_package
    

    (*) [name of launch node] must be equal to the value of 'name' attribute in launch file.

  • [optional] If you want to use ROS/cFE network bridge, edit "relay_base/relay_node_base/launch/Connection.launch". Available parameters are as follows.

    • protocol:tcp/udp
    • port:port-number for receiving messages
    • port_send:destination's port-number for sending messages
    • ip_addr:IP address of destination
    • ring_length:buffer size for receiving messages
  • [optional] If you want to use ROS/cFE network bridge, edit "relay_base/relay_node_base/launch/MsgId2Topic.launch". Available parameters are as follows.

    • topic:topic name published/subscribed by "ros_relay_node"
    • ros_data_type:ROS message type
    • msg_id:cFE message id used for publication/subscription on "cfe_relay_app"
    • cfe_data_type:cFE data type
    • sender:=0 when ROS-->cFE / =1 when cFE-->ROS
  • Add execution authority to "start_cfs_converter.sh", run it.

    chmod +x start_cfs_converter.sh  
    ./start_cfs_converter.sh
    

    "start_cfs_converter.sh" generates

    • "converted ROS node" at the path specified by cfe_path in "config.ini"
    • [optional] "ros_relay_node" at the path specified by ros_path in "config.ini"
    • [optional] "cfe_relay_app" at the path specified by cfe_path in "config.ini"
  • Copy convert_lib directory into apps directory of cFE.

    cp -pr [your working directory]/roscfe/convert_lib [your working directory]/cFE-6.5.0-OSS-release/apps/ 
    
  • Move to the directory including "Makefile" at "converted ROS node" in cFE.

    cd [your working directory]/cFE-6.5.0-OSS-release/apps/["converted ROS node"]/fsw/for_build/
    

    Modify "OBJS" and ".cpp.o" fields in "Makefile". Ex)

    OBJS = my_node.o /usr/lib/i386-linux-gnu/libstdc++.so.6
    
    .cpp.o:  
        $(COMPILER) $(LOCAL_COPTS) -std=c++11 -m32 -Wall $(INCLUDE_PATH) -g -O0 -DOS_DEBUG_LEVEL=$(DEBUG_LEVEL) -c -o my_node [cpp file path] 
    
  • Move to the directory including "Makefile" at cFE build directory.

    cd [your working directory]/cFE-6.5.0-OSS-release/build/cpu1/Makefile
    

    Modify "THE_APPS" as follows,

    THE_APPS := convert_lib ["converted ROS node" DIRECTORY NAME]
    

    [optional] If you build "cfe_relay_app", add it into "THE_APPS"

    THE_APPS := convert_lib relay_app ["converted ROS node" DIRECTORY NAME]
    
  • Move to the directory including "cfe_es_startup.scr".

    cd [your working directory]/cFE-6.5.0-OSS-release/build/cpu1/exe/cfe_es_startup.scr
    

    Add the activation-setting-line for "converted ROS node".
    Ex)

    CFE_LIB, /cf/apps/convert_lib.so,   CONVERT_LibInit,CONVERT_LIB,  0,   0,    0x0, 0;
    CFE_APP, /cf/apps/["converted ROS node" directory name].so, [ENTRY_PT(*)],[name of app], [priority(**)], 8192, 0x0, 0;
    

    (*): It is defined at "Makefile" modified at previous step.
    (**): The smaller number it is, the higher priority the app has.
    [optional] If "cfe_relay_app" is added, set the lowest priority to it.

    CFE_LIB, /cf/apps/convert_lib.so,   CONVERT_LibInit,CONVERT_LIB,  0,   0,    0x0, 0;
    CFE_APP, /cf/apps/sample_sub_1.so,     sub_main_1_, SAMPLE_SUB,  10,   8192, 0x0, 0;
    CFE_APP, /cf/apps/relay_app.so, RELAY_AppMain,RELAY_APP, 20, 0, 0x0, 0;
    

Build & Run on Linux

[optional] ROS build & run

If you want to run "ros_relay_app", follow the below instructions.

  • Move to your ros workspace, execute build commands.

    cd [your catkin workspace]  
    catkin_make clean  
    catkin_make -i  
    catkin_make
    
  • Execute bellow command.

    rosrun relay_node relay_node
    rosrun [my_ros_pkg] [my_ros_node] 
    

cFE build & run

  • Execute bellow commands.

    cd [your working directory]/cFE-6.5.0-OSS-release  
    . ./setvars.sh
    
  • Remove old-build-directories.

    cd build/cpu1  
    rm -rf [old-build-directores]
    
  • Execute build commands.

    make config  
    make 
    
  • Run cFE apps.

    cd exe  
    sudo su  
    ./core-linux.bin
    

Reference

roscfe's People

Contributors

yuyuqq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

roscfe's Issues

RACS2 (RACS for ROS2) released!

Our team at Japan Aerospace Exploration Agency (JAXA) has prototyped "RACS2[1]," which connects ROS2 with Core Flight System (cFS)[2].

  1. RACS2 extended DDS: connecting ROS2 and cFS via DDS layer
    https://github.com/jaxa/racs2_extended-dds

  2. The ROS2/cFE bridge: bridging topics bw. ROS2 and cFS in the application layer
    https://github.com/jaxa/racs2_bridge

SpaceROS (pure ROS2) will be ideal for space robotics projects. And, since many spacecrafts are built by cFS, RACS2 (ROS2 on robot + cFS on ordinal spacecraft) would be a realistic choice. RACS2 should be a good option of SpaceROS.

Although it is too late to use RACS2/ROS2 in our ongoing space robotic project, we are planning to test RACS2/ROS2 on Int-ball2 (a successor mission of Int-Ball) in International Space Station (ISS) in 2024.

[1] Hiroki Kato (JAXA) and Tatsuhiko Saito (Systems Engineering Consultants (SEC)). "RACS2: the ROS2 and cFS System, launched" Flight Software Workshop 2023 in March 2023 (Presentation here)

ROS Relay node missing header files

Hi,

I am currently trying to run the ROS relay node, following the installation instructions provided in the README. However, I am encountering the error below, which indicates that I am missing a header file(s) for the node when I run catkin_make (after running catkin_make clean and catkin_make -i, as suggested in the instructions) in the ROS workspace where the relay_node was created.

For context, this is in fact the relay_node that results from running the ./start_cfs_converter.sh script. I am using the Connection.launch and MsgId2Topic.launch files provided without modification, although I know I will have to eventually, but I would not expect those changes to resolve this error.

Any help would be greatly appreciated. Thank you so much!

In file included from /home/ubuntu/astrolab/catkin_ws/src/relay_node/src/convert/publisher.cpp:19:0:
/home/ubuntu/astrolab/catkin_ws/src/relay_node/include/ros_serializer/ardrone_autonomy_navdata_serializer.h:12:38: fatal error: ardrone_autonomy/Navdata.h: No such file or directory
compilation terminated.
relay_node/CMakeFiles/relay_node.dir/build.make:158: recipe for target 'relay_node/CMakeFiles/relay_node.dir/src/convert/publisher.cpp.o' failed
make[2]: *** [relay_node/CMakeFiles/relay_node.dir/src/convert/publisher.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/ubuntu/astrolab/catkin_ws/src/relay_node/include/convert/subscriber.h:27:0,
                 from /home/ubuntu/astrolab/catkin_ws/src/relay_node/src/relay_node.cpp:17:
/home/ubuntu/astrolab/catkin_ws/src/relay_node/include/ros_serializer/ardrone_autonomy_navdata_serializer.h:12:38: fatal error: ardrone_autonomy/Navdata.h: No such file or directory
compilation terminated.
relay_node/CMakeFiles/relay_node.dir/build.make:62: recipe for target 'relay_node/CMakeFiles/relay_node.dir/src/relay_node.cpp.o' failed
make[2]: *** [relay_node/CMakeFiles/relay_node.dir/src/relay_node.cpp.o] Error 1
In file included from /home/ubuntu/astrolab/catkin_ws/src/relay_node/include/convert/subscriber.h:27:0,
                 from /home/ubuntu/astrolab/catkin_ws/src/relay_node/src/convert/subscriber.cpp:9:
/home/ubuntu/astrolab/catkin_ws/src/relay_node/include/ros_serializer/ardrone_autonomy_navdata_serializer.h:12:38: fatal error: ardrone_autonomy/Navdata.h: No such file or directory
compilation terminated.
relay_node/CMakeFiles/relay_node.dir/build.make:182: recipe for target 'relay_node/CMakeFiles/relay_node.dir/src/convert/subscriber.cpp.o' failed
make[2]: *** [relay_node/CMakeFiles/relay_node.dir/src/convert/subscriber.cpp.o] Error 1
CMakeFiles/Makefile2:462: recipe for target 'relay_node/CMakeFiles/relay_node.dir/all' failed
make[1]: *** [relay_node/CMakeFiles/relay_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j3 -l3" failed

Additional relay-node implementation guide

Hello,

I was wondering if you could create or share additional implementation guides on relay_node. I'm trying to implement some basic ROS movement and video capture through roscFE on a Gazebo simulation.

I'm a little lost on how to use the custom roscFE libraries to do this.

Thanks,
Corey C.

Running hk_pub/hk_sub nodes

Hi,

Currently, I am trying to test the relay_node using the provided hk_pub and hk_sub ROS packages. I copied the ROS packages into my catkin_ws and am running catkin_make, but I'm getting the cmake error below. Is there anything I'm doing wrong or that I should change?

Thanks again!

Scanning dependencies of target hk_pub
Scanning dependencies of target hk_sub
[  0%] Built target rosgraph_msgs_generate_messages_py
[  3%] Building CXX object hk_pub/CMakeFiles/hk_pub.dir/src/hk_pub.cpp.o
In file included from /home/ubuntu/astrolab/fsw/catkin_ws/src/hk_pub/src/hk_pub.cpp:13:0:
/home/ubuntu/astrolab/fsw/catkin_ws/src/hk_pub/include/hk_pub/hk_pub.h:11:38: fatal error: relay_node/CFE_SB_CmdHdr.h: No such file or directory
compilation terminated.
hk_pub/CMakeFiles/hk_pub.dir/build.make:62: recipe for target 'hk_pub/CMakeFiles/hk_pub.dir/src/hk_pub.cpp.o' failed
make[2]: *** [hk_pub/CMakeFiles/hk_pub.dir/src/hk_pub.cpp.o] Error 1
CMakeFiles/Makefile2:427: recipe for target 'hk_pub/CMakeFiles/hk_pub.dir/all' failed
make[1]: *** [hk_pub/CMakeFiles/hk_pub.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  3%] Built target std_msgs_generate_messages_lisp
[  7%] Building CXX object hk_sub/CMakeFiles/hk_sub.dir/src/hk_sub.cpp.o
In file included from /home/ubuntu/astrolab/fsw/catkin_ws/src/hk_sub/src/hk_sub.cpp:12:0:
/home/ubuntu/astrolab/fsw/catkin_ws/src/hk_sub/include/hk_sub/hk_sub.h:11:36: fatal error: relay_node/HK_HkPacket.h: No such file or directory
compilation terminated.
hk_sub/CMakeFiles/hk_sub.dir/build.make:62: recipe for target 'hk_sub/CMakeFiles/hk_sub.dir/src/hk_sub.cpp.o' failed
make[2]: *** [hk_sub/CMakeFiles/hk_sub.dir/src/hk_sub.cpp.o] Error 1
CMakeFiles/Makefile2:962: recipe for target 'hk_sub/CMakeFiles/hk_sub.dir/all' failed
make[1]: *** [hk_sub/CMakeFiles/hk_sub.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j3 -l3" failed

ROS2 Support

Hi,
I was wondering if you had any intents to adapt these conversion and relay tools to ROS2, or if you had any sense of what challenges there would be in doing so.
Thanks,
Steve

Missing Tutorial Files for cFS Build

I was following along with several of the tutorials and it looks like there are several missing files that were called out to copy over to the cFS location. Looking at example 4, step 9 and 10 call for copying the Makefile and cfe_es_startup.scr files from the tutorial directory in the repo. I was able to create my own, but it would be nice to be able to follow the tutorial all the way through and compare the files.

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.