Skip to content

Commit 288a29c

Browse files
Fixes for ROS2ScriptIntegration (#63)
* Fix cmake in ROS2ScriptIntegration * Fix name in string message PublishStdMsgsString -> PublishStdMsgString Signed-off-by: Jan Hanca <[email protected]>
1 parent e745e1e commit 288a29c

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

Gems/ROS2ScriptIntegration/Code/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
129129
BUILD_DEPENDENCIES
130130
PUBLIC
131131
AZ::AzToolsFramework
132-
$<TARGET_OBJECTS:Gem::${gem_name}.Private.Object>
132+
Gem::${gem_name}.Private.Object
133133
Gem::ROS2.Static
134134
)
135135

Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptPublisherBus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace ROS2ScriptIntegration
2525
AZ_RTTI(PublisherRequests, "{b8356874-f7ba-4436-8d98-a342d7c720d9}");
2626
static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
2727
static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
28-
virtual void PublishStdMsgsString(const AZStd::string& topicName, const AZStd::string& value) = 0;
28+
virtual void PublishStdMsgString(const AZStd::string& topicName, const AZStd::string& value) = 0;
2929
virtual void PublishStdMsgEmpty(const AZStd::string& topicName) = 0;
3030
virtual void PublishStdMsgUInt32(const AZStd::string& topicName, const uint32_t value) = 0;
3131
virtual void PublishStdMsgInt32(const AZStd::string& topicName, const int32_t value) = 0;

Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ namespace ROS2ScriptIntegration
8686
}
8787

8888
// Publishers overrides ...
89-
void PublisherSystemComponent::PublishStdMsgsString(const AZStd::string& topicName, const AZStd::string& value)
89+
void PublisherSystemComponent::PublishStdMsgString(const AZStd::string& topicName, const AZStd::string& value)
9090
{
9191
std_msgs::msg::String message;
9292
message.data = std::string(value.c_str());

Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace ROS2ScriptIntegration
3838

3939
protected:
4040
// ROS2ScriptIntegrationRequestBus::Handler overrides ...
41-
void PublishStdMsgsString(const AZStd::string& topicName, const AZStd::string& value) override;
41+
void PublishStdMsgString(const AZStd::string& topicName, const AZStd::string& value) override;
4242

4343
void PublishStdMsgEmpty(const AZStd::string& topicName) override;
4444

Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptPublisherBus.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ namespace ROS2ScriptIntegration
1414
->Attribute(AZ::Script::Attributes::Category, "ROS2")
1515
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
1616
->Attribute(AZ::Script::Attributes::Module, "ROS2")
17-
->Event(
18-
"PublishStdMsgsString", &PublisherRequestBus::Events::PublishStdMsgsString, { { { "Topic", "" }, { "Value", "" } } })
17+
->Event("PublishStdMsgString", &PublisherRequestBus::Events::PublishStdMsgString, { { { "Topic", "" }, { "Value", "" } } })
1918
->Event("PublishStdMsgEmpty", &PublisherRequestBus::Events::PublishStdMsgEmpty, { { { "Topic", "" } } })
2019
->Event("PublishStdMsgUInt32", &PublisherRequestBus::Events::PublishStdMsgUInt32, { { { "Topic", "" }, { "Value", "" } } })
2120
->Event("PublishStdMsgInt32", &PublisherRequestBus::Events::PublishStdMsgInt32, { { { "Topic", "" }, { "Value", "" } } })

Gems/ROS2ScriptIntegration/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Let us write a simple publisher using Script Canvas.
2424
The "OnGraphStart" node is called on the component being activated.
2525
It activates a "Heart Beat" node.
2626
The "Heart Beat" node is configured to issue a pulse every 100 milliseconds.
27-
Finally, pulse cause the publication message by node `PublishStdMsgsString`.
27+
Finally, pulse cause the publication message by node `PublishStdMsgString`.
2828

2929
**Note** that the publisher is initialized on the first pulse.
3030
To see your messages, start the simulation and type in the terminal:
@@ -37,9 +37,9 @@ You should see new messages arriving with a frequency of 10 Hertz.
3737

3838
The message can be published from LUA scripting language using a single call:
3939
```lua
40-
PublisherRequestBus.Broadcast.PublishStdMsgsString("/hello", "Hello world from Lua")
40+
PublisherRequestBus.Broadcast.PublishStdMsgString("/hello", "Hello world from Lua")
4141
```
42-
in which the first parameter is a topic name and the rest of the parameters form the message (only one string in `PublishStdMsgsString` method).
42+
in which the first parameter is a topic name and the rest of the parameters form the message (only one string in `PublishStdMsgString` method).
4343

4444
## Subscriber
4545

0 commit comments

Comments
 (0)