dock docker updated
This commit is contained in:
parent
5d606b9f26
commit
7aeee886c6
|
@ -1,12 +1,16 @@
|
||||||
FROM isaac_ros_dev-aarch64
|
# FROM isaac_ros_dev-aarch64
|
||||||
|
FROM ros:humble
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
# uodate and install dependencies
|
# uodate and install dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
ros-humble-rmw-cyclonedds-cpp ros-humble-rosidl-generator-dds-idl \
|
ros-humble-rmw-cyclonedds-cpp ros-humble-rosidl-generator-dds-idl \
|
||||||
ros-humble-realsense2-camera \
|
ros-humble-realsense2-camera \
|
||||||
ros-humble-pointcloud-to-laserscan \
|
ros-humble-pointcloud-to-laserscan \
|
||||||
ros-humble-isaac-ros-visual-slam \
|
libyaml-cpp-dev \
|
||||||
ros-humble-isaac-ros-occupancy-grid-localizer\
|
# ros-humble-isaac-ros-visual-slam \
|
||||||
|
# ros-humble-isaac-ros-occupancy-grid-localizer\
|
||||||
|
libboost-all-dev\
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
git \
|
||||||
|
@ -17,9 +21,9 @@ RUN cd / && git clone https://github.com/unitreerobotics/unitree_ros2 && cd /uni
|
||||||
git clone https://github.com/ros2/rmw_cyclonedds -b humble && git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x &&\
|
git clone https://github.com/ros2/rmw_cyclonedds -b humble && git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x &&\
|
||||||
cd .. && colcon build --packages-select cyclonedds && source /opt/ros/humble/setup.bash && colcon build
|
cd .. && colcon build --packages-select cyclonedds && source /opt/ros/humble/setup.bash && colcon build
|
||||||
|
|
||||||
RUN echo "source /opt/ros/humble/setup.bash" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
# RUN echo "source /opt/ros/humble/setup.bash" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
||||||
RUN echo "source /unitree_ros2/cyclonedds_ws/install/setup.bash" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
# RUN echo "source /unitree_ros2/cyclonedds_ws/install/setup.bash" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
||||||
RUN echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
# RUN echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
||||||
# RUN echo "export CYCLONEDDS_URI='<CycloneDDS><Domain><General><Interfaces> <NetworkInterface name="eth0" priority="default" multicast="default" /> </Interfaces></General></Domain></CycloneDDS>'" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
# RUN echo "export CYCLONEDDS_URI='<CycloneDDS><Domain><General><Interfaces> <NetworkInterface name="eth0" priority="default" multicast="default" /> </Interfaces></General></Domain></CycloneDDS>'" >> /usr/local/bin/scripts/workspace-entrypoint.sh
|
||||||
|
|
||||||
# copy the go2py ros2 nodes
|
# copy the go2py ros2 nodes
|
||||||
|
@ -36,4 +40,4 @@ COPY deploy/scripts /root/scripts
|
||||||
COPY deploy/launch /root/launch
|
COPY deploy/launch /root/launch
|
||||||
# set the entrypoint to bash
|
# set the entrypoint to bash
|
||||||
# ENTRYPOINT ["/bin/bash"]
|
# ENTRYPOINT ["/bin/bash"]
|
||||||
ENTRYPOINT ["/bin/bash", "/root/scripts/hw_start.sh"]
|
ENTRYPOINT ["/bin/bash", "/root/scripts/dock_hw_start.sh"]
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -1,12 +1,12 @@
|
||||||
docker:
|
docker_dock:
|
||||||
@docker build --no-cache --tag go2py:latest -f Dockerfile.dock .
|
@docker build --no-cache --tag go2py:latest -f Dockerfile.dock .
|
||||||
|
|
||||||
docker_install:
|
docker_dock_install:
|
||||||
@cp deploy/scripts/go2py-hw-nodes.service /etc/systemd/system/
|
@cp deploy/scripts/go2py-hw-nodes.service /etc/systemd/system/
|
||||||
@systemctl enable go2py-hw-nodes.service
|
@systemctl enable go2py-hw-nodes.service
|
||||||
@systemctl start go2py-hw-nodes.service
|
@systemctl start go2py-hw-nodes.service
|
||||||
|
|
||||||
docker_uninstall:
|
docker_dock_uninstall:
|
||||||
@systemctl disable go2py-hw-nodes.service
|
@systemctl disable go2py-hw-nodes.service
|
||||||
@systemctl stop go2py-hw-nodes.service
|
@systemctl stop go2py-hw-nodes.service
|
||||||
@rm /etc/systemd/system/go2py-hw-nodes.service
|
@rm /etc/systemd/system/go2py-hw-nodes.service
|
|
@ -86,7 +86,8 @@ target_link_libraries(sample
|
||||||
# )
|
# )
|
||||||
|
|
||||||
find_package(CUDA )
|
find_package(CUDA )
|
||||||
if(${CUDA_FOUND})
|
if(OFF)
|
||||||
|
# if(${CUDA_FOUND})
|
||||||
set(CUDA_SOURCE_PROPERTY_FORMAT OBJ)
|
set(CUDA_SOURCE_PROPERTY_FORMAT OBJ)
|
||||||
set(CUDA_SEPARABLE_COMPILATION ON)
|
set(CUDA_SEPARABLE_COMPILATION ON)
|
||||||
include_directories(${CUDA_INCLUDE_DIRS})
|
include_directories(${CUDA_INCLUDE_DIRS})
|
||||||
|
|
|
@ -229,6 +229,8 @@ inline sensor_msgs::msg::PointCloud2 SourceDriver::ToRosMsg(const LidarDecodedFr
|
||||||
|
|
||||||
for (size_t i = 0; i < frame.points_num; i++)
|
for (size_t i = 0; i < frame.points_num; i++)
|
||||||
{
|
{
|
||||||
|
// if(i%2==0) //downsample the number of points by two
|
||||||
|
// {
|
||||||
LidarPointXYZIRT point = frame.points[i];
|
LidarPointXYZIRT point = frame.points[i];
|
||||||
*iter_x_ = point.x;
|
*iter_x_ = point.x;
|
||||||
*iter_y_ = point.y;
|
*iter_y_ = point.y;
|
||||||
|
@ -242,6 +244,7 @@ inline sensor_msgs::msg::PointCloud2 SourceDriver::ToRosMsg(const LidarDecodedFr
|
||||||
++iter_intensity_;
|
++iter_intensity_;
|
||||||
++iter_ring_;
|
++iter_ring_;
|
||||||
++iter_timestamp_;
|
++iter_timestamp_;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
printf("frame:%d points:%u packet:%d start time:%lf end time:%lf\n",frame.frame_index, frame.points_num, frame.packet_num, frame.points[0].timestamp, frame.points[frame.points_num - 1].timestamp) ;
|
printf("frame:%d points:%u packet:%d start time:%lf end time:%lf\n",frame.frame_index, frame.points_num, frame.packet_num, frame.points[0].timestamp, frame.points[frame.points_num - 1].timestamp) ;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
from launch import LaunchDescription
|
||||||
|
from launch.actions import IncludeLaunchDescription
|
||||||
|
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||||
|
from launch.substitutions import ThisLaunchFileDir
|
||||||
|
from launch_ros.actions import Node
|
||||||
|
|
||||||
|
|
||||||
|
def generate_launch_description():
|
||||||
|
return LaunchDescription([
|
||||||
|
# launch the pointcloud to laser scan converter
|
||||||
|
Node(
|
||||||
|
package='pointcloud_to_laserscan', executable='pointcloud_to_laserscan_node',
|
||||||
|
remappings=[('cloud_in', '/go2/lidar_points'),
|
||||||
|
('scan', '/go2/lidar_scans')],
|
||||||
|
parameters=[{
|
||||||
|
'target_frame': 'go2/hesai_lidar',
|
||||||
|
'transform_tolerance': 0.01,
|
||||||
|
'min_height': 0.0,
|
||||||
|
'max_height': 1.0,
|
||||||
|
'angle_min': -1.5708, # -M_PI/2
|
||||||
|
'angle_max': 1.5708, # M_PI/2
|
||||||
|
'angle_increment': 0.0087, # M_PI/360.0
|
||||||
|
'scan_time': 0.3333,
|
||||||
|
'range_min': 0.45,
|
||||||
|
'range_max': 100.0,
|
||||||
|
'use_inf': True,
|
||||||
|
'inf_epsilon': 1.0
|
||||||
|
}],
|
||||||
|
name='pointcloud_to_laserscan'
|
||||||
|
),
|
||||||
|
|
||||||
|
Node(
|
||||||
|
package='hesai_ros_driver',
|
||||||
|
executable='hesai_ros_driver_node',
|
||||||
|
name='go2_hesai_ros_driver_node'
|
||||||
|
),
|
||||||
|
])
|
|
@ -35,26 +35,26 @@ def generate_launch_description():
|
||||||
name='b1_hesai_ros_driver_node'
|
name='b1_hesai_ros_driver_node'
|
||||||
),
|
),
|
||||||
|
|
||||||
Node(
|
# Node(
|
||||||
name='go2_d455_cam',
|
# name='go2_d455_cam',
|
||||||
namespace='go2/d435i_cam',
|
# namespace='go2/d435i_cam',
|
||||||
package='realsense2_camera',
|
# package='realsense2_camera',
|
||||||
executable='realsense2_camera_node',
|
# executable='realsense2_camera_node',
|
||||||
parameters=[{
|
# parameters=[{
|
||||||
'enable_infra1': True,
|
# 'enable_infra1': True,
|
||||||
'enable_infra2': True,
|
# 'enable_infra2': True,
|
||||||
'enable_color': False,
|
# 'enable_color': False,
|
||||||
'enable_depth': False,
|
# 'enable_depth': False,
|
||||||
'depth_module.emitter_enabled': 0,
|
# 'depth_module.emitter_enabled': 0,
|
||||||
'depth_module.profile': '640x480x60',
|
# 'depth_module.profile': '640x480x60',
|
||||||
'enable_gyro': True,
|
# 'enable_gyro': True,
|
||||||
'enable_accel': True,
|
# 'enable_accel': True,
|
||||||
'gyro_fps': 400,
|
# 'gyro_fps': 400,
|
||||||
'accel_fps': 200,
|
# 'accel_fps': 200,
|
||||||
'unite_imu_method': 2,
|
# 'unite_imu_method': 2,
|
||||||
# 'tf_publish_rate': 0.0
|
# # 'tf_publish_rate': 0.0
|
||||||
}]
|
# }]
|
||||||
),
|
# ),
|
||||||
|
|
||||||
# Launch the front looking D455 camera
|
# Launch the front looking D455 camera
|
||||||
# IncludeLaunchDescription(
|
# IncludeLaunchDescription(
|
|
@ -0,0 +1,4 @@
|
||||||
|
source /opt/ros/humble/setup.bash
|
||||||
|
source /unitree_ros2/cyclonedds_ws/install/setup.bash
|
||||||
|
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
||||||
|
source /dock_ws/install/setup.bash && ros2 launch /root/launch/dock.launch.py
|
|
@ -1 +0,0 @@
|
||||||
source /dock_ws/install/setup.bash && ros2 launch /root/launch/hw.launch.py
|
|
Loading…
Reference in New Issue