ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ros2 launch fails after following some tutorials

asked 2022-04-14 04:07:42 -0600

vKuehn gravatar image

updated 2022-04-14 08:36:07 -0600

ros2 launch turtlebot3_cartographer cartographer.launch.py works fine.

colcon_cd PACKAGENAME to ~/dev_ws/src/PACKAGENAME works fine.

colcon build --packages-select PACKAGENAME works fine in ~/dev_ws.

I have that in ~/.baschrc

export _colcon_cd_root=~/dev_ws
export ROS_DOMAIN_ID=1
export ROS_PYTHON_VERSION=3
export ROS_VERSION=ros-foxy
export LC_NUMERIC="en_US.UTF-8"
source /opt/ros/foxy/setup.bash
source /usr/share/colcon_cd/function/colcon_cd.sh

What to check why ros2 launch PACKAGENAME.launch.py would fail ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-04-14 15:18:38 -0600

vKuehn gravatar image

solved.. a package install was missing for one of mine under ~/dev_ws/src. After installing that ros2 launch works fine very odd as the missing PACKAGENAME was the one I have created.

edit flag offensive delete link more

Comments

How did you create this package? Maybe you missed a step in its configuration

ljaniec gravatar image ljaniec  ( 2022-04-14 18:15:20 -0600 )edit

@ljaniec that is very probably the case. But how to fix such a problem I would have hoped for some hint during the start or a log to look at...

vKuehn gravatar image vKuehn  ( 2022-04-15 09:00:42 -0600 )edit

I think rosdep should help you here with additional dependencies in your workspace

ljaniec gravatar image ljaniec  ( 2022-04-15 09:52:27 -0600 )edit

that's the ros1 documentation. but thanks for the hint

vKuehn gravatar image vKuehn  ( 2022-04-15 09:54:11 -0600 )edit

thanks for that and keeping answering

vKuehn gravatar image vKuehn  ( 2022-04-18 14:36:32 -0600 )edit
0

answered 2022-04-14 07:57:57 -0600

Per Edwardsson gravatar image

The command is ros2 launch PACKAGENAME launchfile.launch.py. But if you can provide the exact error code you are facing, that would useful in troubleshooting.

edit flag offensive delete link more

Comments

oh yes that is what I did. Corrected the question for that

it worked but now complains Package 'PACKAGENAME' not found: "package 'PACKAGENAME' not found, searching: ['/opt/ros/foxy']"

for all my packages in ~/dev_ws

vKuehn gravatar image vKuehn  ( 2022-04-14 08:38:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-04-14 04:07:42 -0600

Seen: 327 times

Last updated: Apr 14 '22