Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Prepare general launch file to launch all robotem rovne application n…
Browse files Browse the repository at this point in the history
…odes with one command.
  • Loading branch information
aentinger committed May 13, 2024
1 parent 96f0f83 commit f01e80d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ament_target_dependencies(${ROBOTEM_ROVNE_TARGET} rclcpp std_msgs std_srvs)
ament_export_dependencies(rosidl_default_runtime)
#######################################################################################
install(TARGETS ${ROBOTEM_ROVNE_TARGET} DESTINATION lib/${PROJECT_NAME})
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})
#######################################################################################
ament_package()
#######################################################################################
7 changes: 5 additions & 2 deletions docker/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ ifconfig $CAN txqueuelen 1000
sudo -u fio ifconfig $CAN

docker run -it \
-u 0 \
--privileged \
--ulimit nofile=1024:1024 \
--rm \
-u 0 --privileged \
--device /dev/spidev0.0 \
-v /sys/class/gpio:/sys/class/gpio \
--network host \
robotem_rovne_docker $1
2 changes: 1 addition & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ colcon build --packages-select robotem_rovne

cd /tmp/colcon_ws
. install/setup.sh robotem_rovne
#ros2 launch t07_robot t07_4wd.py &
ros2 launch robotem_rovne all.py
#ros2 launch pika_spark_bno085_driver imu.py &
22 changes: 22 additions & 0 deletions launch/all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os

from ament_index_python.packages import get_package_share_directory

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution

from launch_ros.actions import Node

def generate_launch_description():

pkg_imu = get_package_share_directory('pika_spark_bno085_driver')
imu = IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(pkg_imu, 'launch', 'imu.py'))
)

# Launch them all!
return LaunchDescription([
imu
])

0 comments on commit f01e80d

Please sign in to comment.