Output of additional files (detectors, induction loops) are not being generated. I used a simple scenario, just to see how things work. But I cannot see or maybe these files are not being generated. I added them at launch.xml and sumo.cfg as additional files. This is the code for detector.xml :
<additional>
<laneAreaDetector id="E2" lane="1to2_0" pos="15" endPos="20" length="20.0" friendlyPos="false" freq="5.890e9" file="ostie.xml" timeThreshold="1" speedThreshold="3.6" jamThreshold="10.0" />
</additional>
<additional>
<inductionLoop id="myLoop1" lane="1to2_0" pos="16.0" freq="900" file="out.xml" />
<inductionLoop id="myLoop2" lane="1to2_0" pos="100.0" freq="900" file="out.xml" />
</additional>
The file out is empty. Please help!
Thanks in advance.
You might be using sumo-launchd.py of Veins to run your simulation. If so, the SUMO simulation will execute in a temporary directory (that is, by default, deleted after the simulation concludes). You will either turn this off (see the output of --help) or create the output files in another directory to retain them.
Related
So I am having a problem when calling the command:
file( COPY ${src_dir} DESTINATION ${dest_dir} )
Half the time it works, and then half the time I get an error:
file COPY cannot set permissions on "${dest_dir}/subdir"
My issue is I have changed no permissions or touched these files in between execution. I would prefer to use this method to copy our files, as the other methods with add_custom_command/target does not seem to work on our side. I need to copy these files before our executable target is ultimately declared.
I would even be open to use a bash shell to do this copy command, but it has to be done at this specific point of cmake execution.
I have been wondering if file (COPY...) throws a return value, and if there is a way to possibly rerun the copy command if I get a return. Does anybody know if that is possible?
Can anybody give any help if they have run into this problem?
Thank you!
Edit:
I have already tried using different FILE_PERMISSIONS to see if it would function.
You might set permissions explicitly, with PERMISSIONS <permissions>, FILE_PERMISSIONS <permissions> and DIRECTORY_PERMISSIONS <permissions>, or skip setting-of-permissions through NO_SOURCE_PERMISSIONS.
You could hack in a ls -laR ${dest_dir} command to see if there's anything special going on in the filesystem at the time file(COPY ...) is invoked.
So, what I ended up doing is simply using this copy step in a while loop, because it usually works the 2'nd time, if not the first. Not an elegant way, and may only apply to my case, but please leave other answers if somebody can think of other methods.
I'd like to find out which of the clang-tidy checks are possible to run with the -fix option, i.e. automatically generate fixed code.
I know all the modernize-* checks can do this and some other checks can too (like google-readability-casting) but nowhere did I find a complete list.
Is there a list somewhere? Or a method to find out other than reading the source of each and every check?
EDIT: Since clang-tidy 10 the fix option is included in the list of checks in the documentation.
The rest of my answer is still valid for versions 9 and lower.
grep --include=\*.cpp -rc './' -e "FixItHint"|grep -v ':0$' > FixItChecks.txt
I ran this grep command in the clang-tidy source directory. It counts the number of occurences of "FixItHint" string in all .cpp files and filters out files with zero occurences.
clang::FixItHint is a class that (according to documentation):
Annotates a diagnostic with some code that should be inserted, removed, or replaced to fix the problem.
I admit the method to obtain the list is somewhat crude however I did check multiple files and the results seem to be correct.
The cleaned-up and sorted list of checks with fixes:
abseil/StringFindStartswithCheck
android/CloexecCheck
boost/UseToStringCheck
bugprone/ArgumentCommentCheck
bugprone/BoolPointerImplicitConversionCheck
bugprone/CopyConstructorInitCheck
bugprone/InaccurateEraseCheck
bugprone/MacroParenthesesCheck
bugprone/MisplacedOperatorInStrlenInAllocCheck
bugprone/MoveForwardingReferenceCheck
bugprone/ParentVirtualCallCheck
bugprone/StringIntegerAssignmentCheck
bugprone/SuspiciousMemsetUsageCheck
bugprone/SuspiciousSemicolonCheck
bugprone/SuspiciousStringCompareCheck
bugprone/UnusedRaiiCheck
bugprone/VirtualNearMissCheck
cert/PostfixOperatorCheck
cppcoreguidelines/ProBoundsConstantArrayIndexCheck
cppcoreguidelines/ProTypeCstyleCastCheck
cppcoreguidelines/ProTypeMemberInitCheck
cppcoreguidelines/ProTypeStaticCastDowncastCheck
fuchsia/DefaultArgumentsCheck
fuchsia/RestrictSystemIncludesCheck
google/AvoidCStyleCastsCheck
google/ExplicitConstructorCheck
google/ExplicitMakePairCheck
google/GlobalVariableDeclarationCheck
google/TodoCommentCheck
llvm/IncludeOrderCheck
llvm/TwineLocalCheck
misc/DefinitionsInHeadersCheck
misc/RedundantExpressionCheck
misc/StaticAssertCheck
misc/UniqueptrResetReleaseCheck
misc/UnusedAliasDeclsCheck
misc/UnusedParametersCheck
misc/UnusedUsingDeclsCheck
modernize/AvoidBindCheck
modernize/DeprecatedHeadersCheck
modernize/LoopConvertCheck
modernize/MakeSmartPtrCheck
modernize/PassByValueCheck
modernize/RawStringLiteralCheck
modernize/RedundantVoidArgCheck
modernize/ReplaceAutoPtrCheck
modernize/ReplaceRandomShuffleCheck
modernize/ReturnBracedInitListCheck
modernize/ShrinkToFitCheck
modernize/UnaryStaticAssertCheck
modernize/UseAutoCheck
modernize/UseBoolLiteralsCheck
modernize/UseDefaultMemberInitCheck
modernize/UseEmplaceCheck
modernize/UseEqualsDefaultCheck
modernize/UseEqualsDeleteCheck
modernize/UseNoexceptCheck
modernize/UseNullptrCheck
modernize/UseOverrideCheck
modernize/UseTransparentFunctorsCheck
modernize/UseUncaughtExceptionsCheck
modernize/UseUsingCheck
objc/PropertyDeclarationCheck
performance/FasterStringFindCheck
performance/ForRangeCopyCheck
performance/InefficientAlgorithmCheck
performance/InefficientVectorOperationCheck
performance/MoveConstArgCheck
performance/TypePromotionInMathFnCheck
performance/UnnecessaryCopyInitialization
performance/UnnecessaryValueParamCheck
readability/AvoidConstParamsInDecls
readability/BracesAroundStatementsCheck
readability/ContainerSizeEmptyCheck
readability/DeleteNullPointerCheck
readability/IdentifierNamingCheck
readability/ImplicitBoolConversionCheck
readability/InconsistentDeclarationParameterNameCheck
readability/MisplacedArrayIndexCheck
readability/NamedParameterCheck
readability/NamespaceCommentCheck
readability/NonConstParameterCheck
readability/RedundantControlFlowCheck
readability/RedundantDeclarationCheck
readability/RedundantFunctionPtrDereferenceCheck
readability/RedundantMemberInitCheck
readability/RedundantSmartptrGetCheck
readability/RedundantStringCStrCheck
readability/RedundantStringInitCheck
readability/SimplifyBooleanExprCheck
readability/SimplifySubscriptExprCheck
readability/StaticAccessedThroughInstanceCheck
readability/StaticDefinitionInAnonymousNamespaceCheck
readability/StringCompareCheck
readability/UniqueptrDeleteReleaseCheck
I am trying to perform a segmentation task with PCL/ROS. I am using the dynamic configuration option in ROS as the number of inputs to my segmentation task is large and would like to study the influence of each param. There is no problem with my C++ source code, however when I try to run the launch file my file publisher is not able to find the PCD files.
<launch>
<!-- Start segmentation analysis -->
<node pkg="segmentation_analysis" name="region_growing" type="region_growing" output="screen">
<remap from="selected_file" to="/selected_file" />
</node>
<node pkg="file_selection" name="file_publisher" type="file_publisher" args="/home/anirudh/getbot/ros/3d_scene_analysis/segmentation_analysis">
<param name="extension" value="pcd"/>
<remap from="~file" to="/selected_file"/>
</node>
<node pkg="rqt_reconfigure" name="rqt_reconfigure" type="rqt_reconfigure" >
</node>
But when I run the launch file, I am getting the following error:
ERROR: cannot launch node of type [file_selection/file_publisher]: can't locate node [file_publisher] in package [file_selection]
Any help will be appreciated.
As far as I can tell, your error is not related to not finding PCD files.
It says
can't locate node [file_publisher] in package [file_selection]
So it cannot find the program file_publisher.
So check that:
The package file_selection exists.
The executable file file_publisher exists inside that package.
To check the first item:
If you type:
roscd file_selection
...does the current working directory switch to the file_selection package?
If that doesn't work, figure out why. If it does, try the next step:
To check the second item:
roscd file_selection
find . -executable
...and check if the output contains file_publisher.
Go from there.
Edit: Also note that for ROS related questions there is answers.ros.org
<cfset LOCAL.cmd = expandPath('..\library\gm.exe') />
<cfset LOCAL.args = "convert image1.jpg image2.jpg" />
<cfexecute variable="gm" errorVariable="error"
name="#LOCAL.cmd#"
timeout="10"
arguments="#local.args#" />
<cfdump var="#gm#" />
This code always results in an empty string in gm. No matter how I execute gm with or without parameters. Other examples work fine like running cmd.exe or netstat.exe as is in the CFDocs example. I get no errors thrown or warnings in errorVariable, it simply does nothing.
I modified the code, this version does not work either:
<cfset LOCAL.cmd = expandPath('..\library\gm.exe') />
<cfset LOCAL.args = "convert ""#variables.uploadDirectory##LOCAL.file.source#"" ""#variables.uploadDirectory#optimal-#LOCAL.file.source#""" />
<cfexecute errorVariable="error"
name="c:\windows\system32\cmd.exe"
timeout="10"
outputFile="#expandPath('.\gm.log')#"
arguments="/C #local.cmd# #LOCAL.args#" />
Permissions problems are the most common cause. However, if you are running CF8, you might also try redirecting the error stream and adding an explicit terminate flag. Just to see if you get any output or see different behavior. Early versions did not capture the error stream, which caused some processes to hang. It was fixed in one of the CF8 updaters.
Update: I just noticed your image paths are relative. Perhaps the program is having difficulty locating them. Try using absolute paths for the images.
Update: I tested it with CF9. It does work when using absolute image paths. Though the "gm" variable is understandably empty, since the output is directed to an image file.
<cfexecute variable="gm"
errorVariable="errorOut"
name="C:\GraphicsMagick-1.3.12-Q16\gm.exe"
timeout="10"
arguments="convert c:\art.gif c:\artCopyFromCF9.gif" />
<cfdump var="#variables#">
Without seeing code or your server setup, I would guess you need to check permissions for the user account CF runs under.
If CF is running under the default user, you may need to create a user with access to whatever it is you are trying to do. Then change the service(s) to run under this user. Alternately, you could assign more liberal permissions to the resource you're trying to access.
I have also encountered this with cfexecute and GraphicsMagick. I think the deal is that GM is operating asynchronously and returns before it completes. Running some tests with outputFile/errorFile instead of their variable equivalents, followed by cffile reading the fileInfo on the output file (which is empty per the test script but observed to have contents when opened), I see that the modified time of the output file with contents is actually after the last modified timestamp yielded by FileInfo.
I think if you output to a session variable or something of the sort that could be picked up by another template you could observe the results of the execution having populated the session variable, provided the other template executes after the variable is actually set.
We currently don't format our msbuild output in CC.NET (CruiseControl.Net) and as a result, finding the cause of a broken build involves reading the XML to find the last 'success="false"' instance in the output.
What XSLT do you use to format your msbuild output, and are you happy with the resulting HTML? I.e. do you find it easy to identify the cause of a broken build?
Thanks
b
EDIT:
Here's a sanitised sample of one of our CC project XML elements. I'm now wondering whether the merge of logs is the issue.
<project name="StackOverflowSample">
<workingDirectory>D:\_300</workingDirectory>
<webURL>&viewFarmReportWebURL;</webURL>
<sourcecontrol type="multi">
<sourceControls>
<vsts>
<!-- We get latest from TSF -->
</vsts>
</sourceControls>
</sourcecontrol>
<triggers>
<intervalTrigger seconds="60" />
</triggers>
<tasks>
<msbuild>
<executable>&msbuildExecutable;</executable>
<workingDirectory>app\consoleApp1</workingDirectory>
<projectFile>consoleApp1.sln</projectFile>
<buildArgs>/noconlog /p:Configuration=Release /v:quiet</buildArgs>
<logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,"D:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll"</logger>
</msbuild>
<nunit>
<path>&nunitConsoleExecutable;</path>
<assemblies>
<assembly> D:\_300\app\consoleApp1\bin\Release\consoleApp1.exe</assembly>
</assemblies>
</nunit>
<exec>
<executable>&ncoverExecutable;</executable>
<buildArgs>"&nunitConsoleExecutable;" "app\consoleApp1\bin\Release\consoleApp1.exe" /nologo</buildArgs>
</exec>
<exec>
<executable>&ndependExecutable;</executable>
<buildArgs>D:\_300\app\consoleApp1.xml /Silent</buildArgs>
</exec>
<merge>
<files>
<file>D:\_300\app\consoleApp1\unit-test.xml</file>
<file>D:\_300\app\consoleApp1\ApplicationMetrics.xml</file>
<file>D:\_300\app\consoleApp1\AssembliesBuildOrder.xml</file>
<file>D:\_300\app\consoleApp1\AssembliesDependencies.xml</file>
<file>D:\_300\app\consoleApp1\AssembliesMetrics.xml</file>
<file>D:\_300\app\consoleApp1\CQLResult.xml</file>
<file>D:\_300\app\consoleApp1\InfoWarnings.xml</file>
<file>D:\_300\app\consoleApp1\NDependMain.xml</file>
<file>D:\_300\app\consoleApp1\TypesDependencies.xml</file>
<file>D:\_300\app\consoleApp1\TypesMetrics.xml</file>
</files>
</merge>
</tasks>
<publishers>
<merge>
<files>
<file>D:\_300\app\consoleApp1\SymbolModule.Xml</file>
</files>
</merge>
<xmllogger logDir="." />
&emailconsoleApp1;
</publishers>
</project>
I've tried CruiseControl.Net 1.4.4.83 with Rodemeyer.MsBuildToCCnet.dll 1.0.0.5 as a logger coupled with msbuild2ccnet.xsl, and the output is nothing like the output samples from the article:
Build started
Project "" (Integration.Common.csproj target(s)):
error CS1002:
Build succeeded
error CS1002:
1 Error(s)
0 Warning(s)
Time elapsed
Using ThoughtWorks.CruiseControl.MSBuild.dll as a logger coupled with msbuild.xsl, the results are just fine:
Build started 07/16/2009 13:46:38
Person.cs (18,53): error CS1002: ; expected
Build FAILED
Person.cs (18,53): error CS1002: ; expected
1 Error(s)
0 Warning(s)
Time elapsed 00:00:00
After a conversation the developers (I have been told that the alternative logger you link to is quite old and it's usage is discouraged), I am using the default, standard logger and xslt. If it does cause problems for you, please report a bug on CruiseControl.Net Jira, the more people vote on this the sooner someone with commit access to the code might look into it.
"View Build Log" is a raw view, not usable except for debugging the build server setup - for some of my project this is almost 5MB large and does not cause any problems for the server (although opening it hangs the browser for a while). NCover can cause problems inflating buildlog.xml to over 100MB - you have to use NCoverExplorer to analyze the results before merging them if this happens(but don't bother before you start getting exceptions from the server).
To see the formatted MSBuild results in the WebDashboard, make sure that the dashboard configuration includes msbuild.xsl (this will give you a link to "MSBuild Report" on ViewBuildReport page and include some basic information on the page itself).
It feels a bit wierd answering my own question, but there is a chance that someone might have the same question and appreciate my answer so here it is.
I visited the following page http://confluence.public.thoughtworks.org/display/CCNETCOMM/Improved+MSBuild+Integration that describes the use of a different logger than the traditional logger (normal logger produces very large files that bog the server down when performing the XSLT transformations).
The page provides the logger and an XSLT file along with simple and clear instructions on how to incorporate this into your CC.Net project. I tried this logger and XSLT and found I was still getting the raw XML; in fact, ALL of the XML combined in one HUGE page.