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

Velodyne not working with turtlebot4 #9

Open
Fautos opened this issue Jun 26, 2024 · 0 comments
Open

Velodyne not working with turtlebot4 #9

Fautos opened this issue Jun 26, 2024 · 0 comments

Comments

@Fautos
Copy link

Fautos commented Jun 26, 2024

Hy.

I'm trying to implement a VLP16 from this repo in the turtlebot4 simulator avaliable here: https://github.com/turtlebot/turtlebot4_robot

Following the steps described at this issue I managed to import the model so it appears on gazebo, but the velodyne is not working: turtlebot/turtlebot4_simulator#46

This simulator works with ROS2 humble and gazebo ignition. Then my question is, this velodyne works with gazebo ignition?

If so, here is what I did:

  • First I get all the packages from this repo (velodyne_description, velodyne_gazebo_plugins and velodyne_simulator).
  • Then I copied the script of the issue, and added the following in the turtlebot xacro's file:
<!-- Path to the copied file -->
<xacro:include filename="$(find turtlebot4_sim)/urdf/sensors/velodyne_lidar.urdf.xacro" />

<!-- At the bottom of the file, where the sensors are imported -->
<xacro:velodyne_lidar name="velodyne" parent_link="shell_link">
    <origin xyz="${velodyne_x_offset} ${velodyne_y_offset} ${velodyne_z_offset}" rpy="0 0 0" />
</xacro:velodyne_lidar>
  • Then I added all the dependencies and paths as described at the mentioned issue.

At this point I can see the velodyne attached to the robot, but it isn't working. I don't have any topic in the ros2 topic list, and I'm pretty sure the velodyne is not running. So my second question is, does the velodyne need to be turned on? If so, how can i do it?

Digging at turtlebot4's code I found they connected the rplidar and the oak camera using gz_ros_bridge (file ros_ign_bridge.launch.py from turtlebot4 repo). Maybe I have to do something similar? I tried with this, but i didnt worked (it said that the topic was not found):

velodyne_bridge = Node(
    package='ros_gz_bridge',
    executable='parameter_bridge',
    name='velodyne_bridge',
    output='screen',
    parameters=[{
        'use_sim_time': use_sim_time
    }],
    arguments=[
        [namespace,
        '/sensors/velodyne/velodyne_scan' +
        '@sensor_msgs/PointCloud2[ignition.msgs.PointCloudPacked']
    ],
    )

Pd: I checked the example launcher found at "velodyne_description" and everything was working fine (at least in gazebo classic).

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