I am trying to add a collision object using another way than
planning_scene.addCollisionObjects(std::vector<moveit_msgs::CollisionObject>)
so I am trying to publish on (collision_object) and (attached_collision_object) topics using
ros::Publisher pub_co = nh2.advertise<moveit_msgs::CollisionObject>("collision_object", 10);
ros::Publisher pub_aco = nh2.advertise<moveit_msgs::AttachedCollisionObject>("attached_collision_object", 10);
However nothing shows in Rviz, when i echo the topic the msg is shown but nothing in Rviz
I also tried using moveit_visual_tools method
visual_tools_->publishCollisionBlock(------)
but also i get nothing !
any ideas why ?
The Problem was just simply not listening to the correct planning scene Topic, the strange thing is that the topic name was the .cpp file name (does moveit_visual_tools publish the .cpp as a topic name?)
After the correct planning scene topic was chosen visualization in Rviz was perfect.
Related
Programming for CANalyzer in the Vector CAPL Browser, I can start typing "on message CAN4..." and it will auto complete things for me. I can see the messages. But after selecting a message, it always yells at me with "Expecting message name or identifier. Database missing?" as if it has no idea what I just put in even though it helped me put it there. What is the proper format for this? Is it different since I'm using ARXML instead of DBC? Is it just not compatible?
on message CAN4::Something_PDU // Auto-completes this but gives the error
{
}
on message CAN4.Something_PDU // Never auto-completes this and also doesn't work
{
}
on message CAN4::Something_PDU::Something_Auth // Auto-completes but not sure that's what I want and also doesn't compile with same error.
{
}
What is the right way and/or why doesn't it recognize the database despite its obvious ability to auto-complete? So confused!
I just faced a comparable issue when trying to get called by incoming ethernet signals. They are also defined in an *.arxml, in my case. However, the behavior of the Vector CAPL-Browser was exactly the same as you described.
I figured out that replacing on message with on signal does the trick and the script can get compiled:
on signal Something_Signal // autocompletion works and compiles
{
}
on signal Eth1::Something_Signal // autocompletion doesn't work but compiles
{
}
there is another way to do this: goto Windows symbols on the right panel in CAPL Editor >
try to find Something_PDU > drag and drop PDU_Name on your Code after on message
the CAPL event on message should be use with name
try use
on message Something_PDU
instead of
on message CAN4.Something_PDU
I'm building a NativeScript plugin for iOS to integrate a card payment terminal as an external accessory. It is almost done, and working, but I have problem with passing one argument called "optionals". This is the whole code I'm trying to implement. It's the payworks framework for a Miura terminal. http://www.payworks.mpymnt.com/node/143
MPTransactionParameters *tp = [MPTransactionParameters chargeWithAmount:[NSDecimalNumber decimalNumberWithString:#"5.00"]
currency:MPCurrencyEUR
optionals:^(id<MPTransactionParametersOptionals> _Nonnull optionals) {
optionals.subject = #"Bouquet of Flowers";
optionals.customIdentifier = #"yourReferenceForTheTransaction";
}];
I cannot find a way of sending this "optionals" function.
In the generate typing metadata I see the MPTransactionParametersOptionals is a #protocol, but still don't know how to use it here as a parameter.
This is my current javascript code for the block
const tp = MPTransactionParameters.chargeWithAmountCurrencyOptionals(
amount,
MPCurrencyEUR,
function (optionals) {
console.log(optionals); //logs the newly created MPTransactionParameters instance, with set amount and currency properties, but cannot touch or set the optional properties.
}
);
The 3rd parameter of chargeWithAmountCurrencyOptionals() should be a function, but I'm doing it wrong, and searched everywhere in google how to do it but no success. I'm already trying for 2 days.
It is working, when the 3rd parameter is null, but I need the set the optional properties.
EDIT: adding the metadata. There are a lot of typings for MPtransactionParameters, so I decided to give you the whole file so you can search.
https://drive.google.com/open?id=1kvDoXtGbCoeCT20b9_t2stc2Qts3VyQx
EDIT2: Adding the typings:
https://drive.google.com/open?id=1lZ3ULYHbX7DXdUQMPoZeSfyEZrjItSOS
My question is simple, yet still hard to do... I want to be able to only display one (1) message at a time using toastr.js
I have tried the following options already:
"maxOpened": 1,
"limit":1
None of those work and result in this:
How can I achieve that when there is a new message, the older one closes and displays the new message?
Try this:
toastr.options.preventDuplicates = true;
I've a requirement to download a file from S3 based on a message content. In other words, the file to download is previously unknown, I've to search and find it at runtime. S3StreamingMessageSource doesn't seem to be a good fit because:
It relies on polling where as I need to wait for the message.
I can't find any way to create a S3StreamingMessageSource dynamically in the middle of a flow. gateway(IntegrationFlow) looks interesting but what I need is a gateway(Function<Message<?>, IntegrationFlow>) that doesn't exist.
Another candidate is S3MessageHandler but it has no support for listing files which I need for finding the desired file.
I can implement my own message handler using AWS API directly, just wondering if I'm missing something, because this doesn't seem like an unusual requirement. After all, not every app just sits there and keeps polling S3 for new files.
There is S3RemoteFileTemplate with the list() function which you can use in the handle(). Then split() result and call S3MessageHandler for each remote file to download.
Although the last one has functionality to download the whole remote dir.
For anyone coming across this question, this is what I did. The trick is to:
Set filters later, not at construction time. Note that there is no addFilters or getFilters method, so filters can only be set once, and can't be added later. #artem-bilan, this is inconvenient.
Call S3StreamingMessageSource.receive manually.
.handle(String.class, (fileName, h) -> {
if (messageSource instanceof S3StreamingMessageSource) {
S3StreamingMessageSource s3StreamingMessageSource = (S3StreamingMessageSource) messageSource;
ChainFileListFilter<S3ObjectSummary> chainFileListFilter = new ChainFileListFilter<>();
chainFileListFilter.addFilters(
new S3SimplePatternFileListFilter("**/*/*.json.gz"),
new S3PersistentAcceptOnceFileListFilter(metadataStore, ""),
new S3FileListFilter(fileName)
);
s3StreamingMessageSource.setFilter(chainFileListFilter);
return s3StreamingMessageSource.receive();
}
log.warn("Expected: {} but got: {}.",
S3StreamingMessageSource.class.getName(), messageSource.getClass().getName());
return messageSource.receive();
}, spec -> spec
.requiresReply(false) // in case all messages got filtered out
)
i am trying to use the reminder api but with no luck. The code that i use to create the reminder is located below. The thing that happens is that the reminder is not triggered until i add another reminder, att this point the old reminder goes of immediately. I guess this code does not say much as it is almost copy pasted from Microsoft's tutorial on reminders. however i do not know where the problem could be otherwise (i will post other code snippets if you have suggestions where the problem may lie)
Reminder notification = new Reminder(""+uniqueId);
notification.Title = "Title";
notification.Content = "Content";
notification.BeginTime = DateTime.Now.AddSeconds(10);
notification.RecurrenceType = RecurrenceInterval.None;
notification.NavigationUri = new Uri("/MyPage.xaml?id=" + uniqueId, UriKind.Relative);
// Register the reminder with the system.
ScheduledActionService.Add(notification);
Ok there was nothing wrong with the code. The emulators system time was set to automatic but was somehow going 20 min wrong which led to strange behaviour. After setting time manually it works as expected.