Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ROS2) ray does not work - topic is not published #1557

Open
PetropoulakisPanagiotis opened this issue Nov 8, 2024 · 0 comments
Open

(ROS2) ray does not work - topic is not published #1557

PetropoulakisPanagiotis opened this issue Nov 8, 2024 · 0 comments

Comments

@PetropoulakisPanagiotis
Copy link

here is my .xacro for the ultrasound sensor that is included in the robot.xacro.

I have added the sensor and plugin but I can not see any topic related to the ray sensor. I would appreciate any help. Thank you!

<?xml version="1.0"?>

<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
    <xacro:macro name="ultraSound" params="name *origin">
        <joint name="ultraSound_joint_${name}" type="fixed">
            <xacro:insert_block name="origin"/>
            <parent link="trunk"/>
            <child link="ultraSound_${name}"/>
        </joint>
        <link name="ultraSound_${name}">
            <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <box size=".001 .001 .001"/>
            </geometry>
            </collision>

            <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://go1_description/meshes/ultraSound.dae" scale="1 1 1"/>
            </geometry>
            <material name="black"/>
            </visual>

            <inertial>
            <mass value="1e-5" />
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
            </inertial>
                        
        <sensor name="ultra_sound_${name}" type="ray">
          <ray>
            <scan>
              <horizontal>
                <samples>300</samples>
                <resolution>1.0</resolution>
                <min_angle>-0.5236</min_angle>
                <max_angle>0.5236</max_angle>
              </horizontal>
              <vertical>
                <samples>100</samples>
                <resolution>1.0</resolution>
                <min_angle>-0.5236</min_angle>
                <max_angle>0.5236</max_angle>
              </vertical>
            </scan>
            <range>
              <min>0.05</min>
              <max>50.0</max>
            </range>s
          </ray>
          <always_on>true</always_on>
          <update_rate>10.0</update_rate>
          <plugin name="ultra_sound_${name}" filename="libgazebo_ros_ray_sensor.so">
            <ros>
              <namespace>/ray</namespace>
              <remapping>~/out:=ultra_sound_${name}</remapping>
            </ros>
            <output_type>sensor_msgs/PointCloud2</output_type>
          </plugin>
	  </sensor> 
	  
	  
        </link>
        
    </xacro:macro>
</robot>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant