I am using rosbridge. My current ros_distro is melodic. I cannot subscribe to custom messages with an error : Unable to load the manifest for package <pkg_name>. I sourced the bash file in another terminal : . ./devel/setup.bash and used rospack find <pkg_name> but this also gives an error : package not found.
This is strange as I can publish and subscribe to the same topic in ROS.
My directory structure looks like following :
overlay_ws
build
devel
src
CMakeLists.txt
ros_tutorials
CMakeLists.txt
package.xml
msg
msg1
msg2
msg3
scripts
talker.py
Here is the package.xml:
<?xml version="1.0"?>
<package format="2">
<name>ros_tutorials</name>
<version>0.0.0</version>
<description>The demo package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe#example.com">Jane Doe</maintainer> -->
<maintainer email="vishal#todo.todo">vishal</maintainer>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>message_runtime</exec_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
Related
Is there a way to instantly trigger or execute the downloaded file using html only?
Here is the simple script that I am using and this call will just simply download my app but my aim is not just simply download it but what I need is to execute directly on what I've downloaded on this link
href="http://localhost:8088/main/system/launch/client/MyApp.jnlp"
Appreciate any suggestions or commentsm TIA.
You probably want to read this: https://docs.oracle.com/javase/tutorial/deployment/webstart/deploying.html. The file you're trying to run is kind of like a Java applet, and will require Java to be installed on the client as well as get permission, etc. to open.
That page goes into detail about what html markup is required, particularly this part
Create the HTML page from which your application will be launched. Invoke Deployment Toolkit functions to deploy the Java Web Start application.
In the example, the Dynamic Tree Demo application is deployed in JavaWebStartAppPage.html.
<body>
<!-- ... -->
<script src=
"https://www.java.com/js/deployJava.js"></script>
<script>
// using JavaScript to get location of JNLP
// file relative to HTML page
var dir = location.href.substring(0,
location.href.lastIndexOf('/')+1);
var url = dir + "dynamictree_webstart.jnlp";
deployJava.createWebStartLaunchButton(url, '1.7.0');
</script>
<!-- ... -->
</body>
My guess is you could simplify it by doing something like this:
<body>
<!-- ... -->
<script src="https://www.java.com/js/deployJava.js"></script>
<script>
deployJava.createWebStartLaunchButton(
"http://localhost:8088/main/system/launch/client/MyApp.jnlp",
"1.7.0"
);
</script>
<!-- ... -->
</body>
It seems that when you run the above code, something like this appears below it:
<img src="//java.com/js/webstart.png" border="0">
So you might try just running a modified version of the JavaScript inside of that href. In your case, probably:
const url = "http://localhost:8088/main/system/launch/client/MyApp.jnlp";
if (!deployJava.isWebStartInstalled("1.7.0")) {
if (deployJava.installLatestJRE()) {
deployJava.launch(url);
}
} else {
deployJava.launch(url);
}
Is it possible to change default color of the TimePickerAndroid component ?
You would have to change it from the styles.xml file of android. Here's what you do:
1) Open up styles.xml: "android/app/src/main/res/values/styles.xml"
2) you'll need to add a few lines:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:timePickerDialogTheme">#style/Dialog.Theme</item>
</style>
<style name="Dialog.Theme" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF0000</item>
<item name="android:textColorPrimary">#0000FF</item>
</style>
In styles.xml you should already have:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
If you do just add the remaining lines. If not go ahead and add them.
4) Lastly, just recompile the app. "react-native run-android". You should see the color change right away.
Using React-native, unfortunately no.
However, by changing some java files in RN and using this solution from SO you might be able to do it.
If you succeed doing this, I suggest you create a Pull Request on RN's repository as it might be very useful for other users.
You could also develop it as a module and open source via NPM.
I wish to copy some twig files while removing the 'src' suffix
example: someCode.html.src.twig
with the result : someCode.html.twig
using gulp rename as I must have this change implemented for several files that all have the src suffix.
I also wish to maintain the directory structure:
example:
D: test --> formsDirectory --> someFile.html.src.twig
, someotherFile.html.src.twig
--> SomeOtherDir --> onemore.html.src.twig
result:
D: someDir --> formsDirectory --> someFile.html.twig
, someotherFile.html.twig
--> SomeOtherDir --> onemore.html.twig
I know that I can use gulp rename to remove the extension and basename however I wish to only change the suffix are illustrated. Any Help would be Great! thanks
Use gulp-ext-replace
Example:
.pipe(ext_replace('twig', '.src.twig'))
I'm working on a Grails 2.4.4 project. I have the following code on my gsp page (not a template) that calls a sub template that calls another template: main gsp page > gsp template > yet another gsp template:
main.gsp
...
<g:render template="/details" model="[param_one:'param_one', param_two:'param_two']" />
...
_details.gsp
...
<p>On details: ${param_one}</p>
<g:render template="/segments/segment-one" model="[param_two:'${param_two}']" />
...
_segment-one.gsp
<p>Segment One: ${param_two}</p>
Now when it renders the whole page, it only shows something like this:
On details: param_one
Segment One: ${param_two}
Why does _segment-one.gsp fails to render the passed param_two? Is it not allowed to have template from another template rendering? Thanks guys.
First, you are allowed to have gsp pages call templates that call templates indefinitely. When you call a template, you are literally including the code of the template into the including page at runtime; in other words, a template is part of the caller and it would have access by default to all objects visible to the caller. All you have to do is to change your second inclusion to:
<g:render template="/segments/segment-one" />
Now, template segment-one will already have access to param_one and param_two. You only need to use your model tag again if you are passing something new created in the local template (or gsp) you are in.
I fixed the code in _segment-one.gsp by adding the params keyword:
<p>Segment One: ${params.param_two}</p>
^^^^^^
i am trying to add a payment to quickbooks online from my web app. This is the xml that i am sending:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="6.0"?>
<QBXML>
<SignonMsgsRq>
<SignonTicketRq>
<ClientDateTime>2013-05-09T01:37:58</ClientDateTime>
<SessionTicket>V1-115-Q04ffswegvh9uzxaw8qrud:689712285</SessionTicket>
<Language>English</Language>
<AppID>688664435</AppID>
<AppVer>1</AppVer>
</SignonTicketRq>
</SignonMsgsRq>
<QBXMLMsgsRq onError="stopOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd defMacro="MACROTYPE"> <!-- required -->
<CustomerRef> <!-- required -->
<ListID >5</ListID> <!-- optional -->
</CustomerRef>
<ARAccountRef>
<FullName>Accounts Receivable:Customer Receivables</FullName>
</ARAccountRef>
<AppliedToTxnAdd> <!-- optional, may repeat -->
<TxnID useMacro="MACROTYPE" >143</TxnID> <!-- required -->
</AppliedToTxnAdd>
<TxnDate >2013-05-09</TxnDate>
<RefNumber >123</RefNumber>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
</QBXMLMsgsRq>
</QBXML>
I get an error saying:
SAX parser encountered an error parsing request file.
Exception from other package:
org.xml.sax.SAXParseException: The content of element type "ReceivePaymentAdd" must match "(CustomerRef,ARAccountRef?,TxnDate?,RefNumber?,TotalAmount?,PaymentMethodRef?,Memo?,DepositToAccountRef?,CreditCardTxnInfo?,(IsAutoApply|AppliedToTxnAdd+)
I just need to apply a payment to an invoice. The payment will always be for the full amount of the invoice.
Any ideas what is wrong?
Thanks Randy
The order of tags in qbXML matters.
So if the Intuit OSR reference shows you that the correct order of tags is:
<CustomerRef>
<ListID>IDTYPE</ListID>
</CustomerRef>
<ARAccountRef>
<FullName>STRTYPE</FullName>
</ARAccountRef>
<TxnDate>DATETYPE</TxnDate>
<RefNumber>STRTYPE</RefNumber>
...
<AppliedToTxnAdd> ...
And you instead send tags in this order:
<CustomerRef>
<ListID >5</ListID>
</CustomerRef>
<ARAccountRef>
<FullName>Accounts Receivable:Customer Receivables</FullName>
</ARAccountRef>
<AppliedToTxnAdd>
<TxnID useMacro="MACROTYPE" >143</TxnID>
</AppliedToTxnAdd>
<TxnDate >2013-05-09</TxnDate>
<RefNumber >123</RefNumber>
Then you're going to get errors.
(notice you have TxnDate and RefNumber after the AppliedToTxnAdd tag, when the spec defines it as coming before the AppliedToTxnAdd tag)
What it's trying to tell you here:
The content of element type "ReceivePaymentAdd" must match
"(CustomerRef,ARAccountRef?,TxnDate?,RefNumber?,TotalAmount?,PaymentMethodRef?,Memo?,DepositToAccountRef?,CreditCardTxnInfo?,(IsAutoApply|AppliedToTxnAdd+)
Is that it's expecting tags in that order, and you sent them in a different order than it expected.
If you fix the order of the tags, it will work.
We have some example qbXML requests on our QuickBooks integration wiki guide if that helps.