Skip to content

Commit

Permalink
2024.2.0 (#313)
Browse files Browse the repository at this point in the history
* add headers to basic and logical camera images

* 2024.2.0

* switch to using ros clock instead since LastMeasurement time is always 0
  • Loading branch information
jaybrecht authored Mar 15, 2024
1 parent 683909c commit f097b4d
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ log/
# ARIAC Logs
/ariac_log/*/

# New trials
/ariac_gazebo/config/trials/*.yaml

2 changes: 1 addition & 1 deletion ariac_controllers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_controllers</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description>ros2 controllers for ARIAC simulation</description>
<maintainer email="[email protected]"> Justin Albrecht</maintainer>
<license>NIST</license>
Expand Down
2 changes: 1 addition & 1 deletion ariac_description/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_description</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description>Package containing URDF descriptions for all robots in the ARIAC simulation</description>
<maintainer email="[email protected]">justin</maintainer>
<license>NIST</license>
Expand Down
2 changes: 1 addition & 1 deletion ariac_gazebo/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_gazebo</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description>ARIAC ROS2 port</description>
<maintainer email="[email protected]">justin</maintainer>
<license>NIST</license>
Expand Down
2 changes: 1 addition & 1 deletion ariac_gui/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_gui</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description>GUI for creating trial configurations</description>
<maintainer email="[email protected]">Joseph Fernandez</maintainer>
<license>NIST</license>
Expand Down
2 changes: 1 addition & 1 deletion ariac_gui/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
file_names = ['plus','assembly_station','agv','tray','light_icon','dark_icon']+[color+pType for color in PART_COLORS for pType in PART_TYPES]+[f'id_0{i}' for i in range(10)]
setup(
name=package_name,
version='2024.1.0',
version='2024.2.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
Expand Down
2 changes: 1 addition & 1 deletion ariac_moveit_config/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_moveit_config</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description> An package with MoveIt2 configurations for ARIAC robots</description>
<maintainer email="[email protected]">Justin Albrecht</maintainer>
<license>NIST</license>
Expand Down
1 change: 1 addition & 0 deletions ariac_msgs/msg/AdvancedLogicalCameraImage.msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
std_msgs/Header header
ariac_msgs/PartPose[] part_poses
ariac_msgs/KitTrayPose[] tray_poses
geometry_msgs/Pose sensor_pose
1 change: 1 addition & 0 deletions ariac_msgs/msg/BasicLogicalCameraImage.msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
std_msgs/Header header
geometry_msgs/Pose[] part_poses
geometry_msgs/Pose[] tray_poses
geometry_msgs/Pose sensor_pose
2 changes: 1 addition & 1 deletion ariac_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_msgs</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description>Interface definitions for ARIAC</description>
<maintainer email="[email protected]">justin</maintainer>
<license>NIST</license>
Expand Down
2 changes: 1 addition & 1 deletion ariac_plugins/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_plugins</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description>Gazebo/ROS2 plugins for the ARAIC competition</description>
<maintainer email="[email protected]">justin albrecht</maintainer>
<maintainer email="[email protected]">zeid kootbally</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion ariac_sensors/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ariac_sensors</name>
<version>2024.1.1</version>
<version>2024.2.0</version>
<description>Gazebo plugins for the ARIAC sensors</description>
<maintainer email="[email protected]">justin</maintainer>
<license>NIST</license>
Expand Down
9 changes: 9 additions & 0 deletions ariac_sensors/src/ariac_logical_camera_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class AriacLogicalCameraPluginPrivate

std::string camera_name_;
std::string sensor_type_;
std::string frame_name_;

std::map<std::string, int> part_types_;
std::map<std::string, int> part_colors_;
Expand Down Expand Up @@ -91,6 +92,8 @@ void AriacLogicalCameraPlugin::Load(gazebo::sensors::SensorPtr _sensor, sdf::Ele
impl_->camera_name_ = _sdf->Get<std::string>("camera_name");
impl_->sensor_type_ = _sdf->Get<std::string>("sensor_type");

impl_->frame_name_ = gazebo_ros::SensorFrameID(*_sensor, *_sdf);

if (impl_->sensor_type_ == "basic") {
impl_->basic_pub_ = impl_->ros_node_->create_publisher<ariac_msgs::msg::BasicLogicalCameraImage>(
"ariac/sensors/" + impl_->camera_name_ + "/image", rclcpp::SensorDataQoS());
Expand Down Expand Up @@ -177,6 +180,9 @@ void AriacLogicalCameraPluginPrivate::OnUpdate()
basic_image_msg_->tray_poses.push_back(tray.pose);
}

basic_image_msg_->header.stamp = ros_node_->get_clock()->now();
basic_image_msg_->header.frame_id = frame_name_;

basic_pub_->publish(*basic_image_msg_);

} else if (sensor_type_ == "advanced") {
Expand All @@ -185,6 +191,9 @@ void AriacLogicalCameraPluginPrivate::OnUpdate()
advanced_image_msg_->part_poses = parts;
advanced_image_msg_->tray_poses = trays;

advanced_image_msg_->header.stamp = ros_node_->get_clock()->now();
advanced_image_msg_->header.frame_id = frame_name_;

advanced_pub_->publish(*advanced_image_msg_);
}
}
Expand Down

0 comments on commit f097b4d

Please sign in to comment.