From d1d44b84a92c6ea35b2166b94e61ca41a393745c Mon Sep 17 00:00:00 2001 From: wittenator <9154515+wittenator@users.noreply.github.com> Date: Wed, 29 Nov 2023 23:16:24 +0100 Subject: [PATCH] Added small docs --- README.md | 32 +++++++++++++++++++++++++++++--- launch/launch_sim.py | 7 ------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d2f2f88..b7de71c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,33 @@ ## Robot Package Template -This is a GitHub template. You can make your own copy by clicking the green "Use this template" button. +### Installation +``` +sudo apt-get install ros-iron-ros-gz ros-iron-robot-state-publisher +``` -It is recommended that you keep the repo/package name the same, but if you do change it, ensure you do a "Find all" using your IDE (or the built-in GitHub IDE by hitting the `.` key) and rename all instances of `my_bot` to whatever your project's name is. +### Execution +``` +ros2 launch sensor_sim launch_sim.py +``` -Note that each directory currently has at least one file in it to ensure that git tracks the files (and, consequently, that a fresh clone has direcctories present for CMake to find). These example files can be removed if required (and the directories can be removed if `CMakeLists.txt` is adjusted accordingly). \ No newline at end of file +### Changing the position of lidar and camera + +In `/description/lidar.xacro` there is a block looking like this: + +``` + + + + + +``` +Modifying the origin key changes the position of the lidar (relative to the center of the front axle of the car). The simulation needs to be restarted. +There is a similar block in `/description/bbox_camera.xacro` looking like +``` + + + + + +``` +Modifying the origin yields the same result, but the camera is relative to the position of the lidar. \ No newline at end of file diff --git a/launch/launch_sim.py b/launch/launch_sim.py index 097b65d..dab345d 100644 --- a/launch/launch_sim.py +++ b/launch/launch_sim.py @@ -35,12 +35,6 @@ def generate_launch_description(): parameters=[params] ) - node_joint_state_publisher = Node( - package='joint_state_publisher', - executable='joint_state_publisher', - parameters=[{'use_sim_time': True}] - ) - gazebo = IncludeLaunchDescription( PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('ros_gz_sim'), 'launch', 'gz_sim.launch.py')]), @@ -95,7 +89,6 @@ def generate_launch_description(): default_value='-45', description='Lower limit of FOV of lidar'), node_robot_state_publisher, - node_joint_state_publisher, gazebo, spawn_entity, bridge,