robo-friends / m-explore-ros2

Explore_lite port to ROS2
Other
139 stars 45 forks source link

about simulation #12

Closed CCCCe closed 2 years ago

CCCCe commented 2 years ago

sorry, I just try to carry your package and find error on my computer. I can't carry the multi_tb3_simulation_launch.py in your steps,and it report "could not find the resource 'nav2_gazebo_spawner'".But I'm sure I installed it. if I have something setting to set before launch?

charlielito commented 2 years ago

which ROS distro are you running and how did you install nav2?

CCCCe commented 2 years ago

I installed foxy in my computer and used order 'sudo apt install ros-foxy-navigation2 ros-foxy-nav2-bringup ros-foxy-turtlebot3*'. then, I can find the package in path: /opt/ros/foxy/share

charlielito commented 2 years ago

Are you sourcing source /opt/ros/foxy/setup.bash before launching that?

CCCCe commented 2 years ago

Are you sourcing source /opt/ros/foxy/setup.bash before launching that?

yeah,of cource. and after input ". install/local_setup.bash", can only carry the launch file. if not, it report "can't find package multirobot_map_merge"

charlielito commented 2 years ago

Actually, you need to install the nav2_gazebo_spawner explicitly, I thought it came with the default nav2_bring_up package, but it does not :upside_down_face: . I'll need to add that to the readme. Basically: sudo apt install ros-${ROS_DISTRO}-nav2-gazebo-spawner

CCCCe commented 2 years ago

Actually, you need to install the nav2_gazebo_spawner explicitly, I thought it came with the default nav2_bring_up package, but it does not 🙃 . I'll need to add that to the readme. Basically: sudo apt install ros-${ROS_DISTRO}-nav2-gazebo-spawner

thanks for your help. And I have another question: how can I set different namespace to control each robot with turtlebot3_teleop and add more robot in same environment by writting .launch.py?

charlielito commented 2 years ago

I don't know how turtlebot3_teleop launching works. If it is a Node you can pass the argument namespace or see if its launch supports namespace as a launch argument.