Skip to content

coscene-io/coEncoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coEncoder

Prerequisite

  • Have ROS on your system

  • Install dependencies

    sudo apt install libavformat-dev libswscale-dev libopencv-dev ros-{ros_distro}-foxglove-msgs -y

Configuration

Edit the configuration parameters in the launch file (coencoder/launch/coencoder.launch):

  • ROS1

    <launch>
        <!-- Specify topics requiring H264 encoding -->
        <rosparam param="/coencoder/subscribe_topics">['/camera_1', '/camera_2', '/camera_3']</rosparam>
        <rosparam param="/coencoder/video_resolutions">['1600x900','640x480','1280x720']</rosparam>
    
        <node name="coencoder" pkg="coencoder" type="coencoder" output="screen">
            <param name="output_fps" value="20"/>
            <param name="bitrate" value="400000"/>  
            <param name="depth_image_max_value" value="10000"/>
        </node>
    </launch>
  • ROS2

    <launch>
        <node pkg="coencoder" exec="coencoder" name="coencoder" output="screen">
        <param name="output_fps" value="20"/>
        <param name="bitrate" value="400000"/>
        <param name="depth_image_max_value" value="10000"/>
        <param name="subscribe_topics" value="['/Node_1_image', '/Node_2_image']"/>
        <param name="video_resolutions" value="['1920*1080', '1920*1080']"/>
        </node>
    </launch>
  • subscribe_topics: Specify one or more topics for H264 encoding. The topic's message types must be sensor_msgs/CompressedImage or sensor_msgs/Image.

  • video_resolutions: Specify the resolution for each topic. Ensure a one-to-one correspondence with subscribe_topics.

Compile OR deb install

*** You can install CoEncoder by compiling it yourself. Alternatively, we will also provide a .deb package for installation. ***

  • Compile

    • ROS1
      # Copy the project into your ROS workspace
      cp -r {this_repo} {your_ros_ws}/src/
      
      # Source ROS setup and build
      source /opt/ros/{ros_distro}/setup.bash
      
      cd {your_ros_ws}
      
      catkin_make --pkg coencoder install
    • ROS2
      # Copy the project into your ROS workspace
      cp -r {this_repo} {your_ros_ws}/src/
      # Source ROS setup and build
      source /opt/ros/{ros_distro}/setup.bash
      
      cd {your_ros_ws}
      colcon build --packages-select coencoder    
  • deb Install

      dpkg -i ros-{ros distro}-coencoder_latest_{system arch}.deb

RUN

  • ROS1

    # if install coencoder by Compile, source your workspace  
    source {your_ros_ws}/install/setup.bash
    # if install coencoder by deb, source ros
    source /opt/ros/{ros destro}/setup.bash
    
    roslaunch coencoder coencoder.launch
  • ROS2

    # if install coencoder by Compile, source your workspace  
    source {your_ros_ws}/install/setup.bash
    # if install coencoder by deb, source ros
    source /opt/ros/{ros destro}/setup.bash
    
    ros2 launch coencoder coencoder_launch.xml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •