Giter Club home page Giter Club logo

Comments (4)

wxmerkt avatar wxmerkt commented on September 13, 2024 1

Hi @shonigmann,
This should be possible - the launch file is a bit confusing here:

  1. node_namespace is an argument to specify the name of the node, not the namespace.
  2. You can specify to load parameters within the <node> tag, and then also use the ns argument to specify a namespace.

E.g.:

<launch>
  <arg name="launch_prefix" default="" /> <!-- set to value="gdbserver localhost:10000" for remote debugging -->
  <arg name="camera_name" default="/cv_camera" />
  <arg name="camera_frame" default="camera" />
  <arg name="image_topic" default="image_rect_color" />
 
  <node pkg="apriltag_ros" type="apriltag_ros_continuous_node" name="apriltag_ros_continuous_node" clear_params="true" output="screen" launch-prefix="$(arg launch_prefix)" ns="my_apriltag_namespace">
    <!-- Remap topics from those used in code to those on the ROS network -->
    <remap from="image_rect" to="$(arg camera_name)/$(arg image_topic)" />
    <remap from="camera_info" to="$(arg camera_name)/camera_info" />

    <param name="camera_frame" type="str" value="$(arg camera_frame)" />
    <param name="publish_tag_detections_image" type="bool" value="true" />      <!-- default: false -->

    <!-- Set parameters -->
    <rosparam command="load" file="$(find apriltag_ros)/config/settings.yaml"/>
    <rosparam command="load" file="$(find apriltag_ros)/config/tags.yaml"/>
  </node>
</launch>

Note the namespace my_apriltag_namespace. The loaded rosparams are now:

/my_apriltag_namespace/apriltag_ros_continuous_node/camera_frame
/my_apriltag_namespace/apriltag_ros_continuous_node/publish_tag_detections_image
/my_apriltag_namespace/apriltag_ros_continuous_node/publish_tf
/my_apriltag_namespace/apriltag_ros_continuous_node/standalone_tags
/my_apriltag_namespace/apriltag_ros_continuous_node/tag_blur
/my_apriltag_namespace/apriltag_ros_continuous_node/tag_bundles
/my_apriltag_namespace/apriltag_ros_continuous_node/tag_debug
/my_apriltag_namespace/apriltag_ros_continuous_node/tag_decimate
/my_apriltag_namespace/apriltag_ros_continuous_node/tag_family
/my_apriltag_namespace/apriltag_ros_continuous_node/tag_refine_edges
/my_apriltag_namespace/apriltag_ros_continuous_node/tag_threads

And the rostopics:

/my_apriltag_namespace/tag_detections
/my_apriltag_namespace/tag_detections_image
/my_apriltag_namespace/tag_detections_image/compressed
/my_apriltag_namespace/tag_detections_image/compressed/parameter_descriptions
/my_apriltag_namespace/tag_detections_image/compressed/parameter_updates
/my_apriltag_namespace/tag_detections_image/compressedDepth
/my_apriltag_namespace/tag_detections_image/compressedDepth/parameter_descriptions
/my_apriltag_namespace/tag_detections_image/compressedDepth/parameter_updates
/my_apriltag_namespace/tag_detections_image/theora
/my_apriltag_namespace/tag_detections_image/theora/parameter_descriptions
/my_apriltag_namespace/tag_detections_image/theora/parameter_updates
/tf

from apriltag_ros.

shonigmann avatar shonigmann commented on September 13, 2024

Hi @wxmerkt ,

Thanks for the quick response! Your suggestion is just about perfect for me!

One more quick question for you - with the proposed change, the tag bundle TF estimates are still getting written to the same TF name (as defined by the bundle name in tags.yaml). I'm not terribly familiar with yaml, so I'm not sure if there is a good way to change this on the fly from within the launch file to so that the TF name matches the namespace, or if I would need to concatenate the namespace in the source code?

This isn't super important for my work - it would just make my RVIZ display a bit cleaner.

Thanks again!

from apriltag_ros.

wxmerkt avatar wxmerkt commented on September 13, 2024

Hi @shonigmann,
The tf currently do not consider the namespace. You'd either have to change it the name in the yaml or we'd have to add an option for a prefix.

from apriltag_ros.

shonigmann avatar shonigmann commented on September 13, 2024

Good to know!

from apriltag_ros.

Related Issues (20)

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.